PHP Screening

PHP Screening

published on January 21, 201112 responses 0
Next »
1/15

PHP server scripts are surrounded by delimiters, which?

<?php>...</?>
<script>...</script>
<?php…?>
2/15

What is the correct way to include the file "time.inc" ?

<!--include file="time.inc"-->
<?php require("time.inc"); ?>
<?php include_file("time.inc"); ?>
3/15

What is the correct way to connect to a MySQL database?

mysql_open("localhost");
connect_mysql("localhost");
mysql_connect("localhost");
4/15

Which of the following regular expressions will match the string no.no.no?

no*no*no*
\.\..\.\..\.\.
..\...\...
no?no?no
5/15

What library do you need in order to process images?

GIF/PNG library
GD library
c-client library
Image Library
6/15

What is the problem with <?=$expression ?> ?

There is no problem
This syntax doesn't even exist It requires a special PHP library that may not always be available
It requires short tags and this is not compatible with XML
7/15

All variables in PHP start with which symbol?

!
$
&
#
8/15

What does this function do: <?php function my_func($variable) {return (is_numeric($variable) && $variable % 2 == 0);}?>

tests whether $variable is a number and ends in 2
tests whether $variable is a number and contains 2
tests whether $variable is an even number
tests whether $variable ends in 2
9/15

What does PHP stand for?

10/15

How do you write "Hello World" in PHP

11/15

In PHP, arrays may be sorted with which of the following functions?

uksort()
arsort()
ksort()
All of the above
12/15

Are objects passed by value or by reference?

13/15

What is the difference between $message and $$message?

14/15

What is the difference between characters \023 and \x23?

15/15

With a heredoc syntax, do I get variable substitution inside the heredoc contents?