PHP Flashcards
(212 cards)
PHP can be run without a server.
False.
Who originally authored PHP, and when?
Rasmus Lerdorf, in 1994.
PHP is an open source product.
True.
PHP is a client-side scripting language whose scripts are embedded in HTML documents.
False, PHP is a server-side scripting language.
Is PHP statically or dynamically typed?
Dynamic.
PHP is purely interpreted, meaning what?
PHP is executed directly by the interpreter without being compiled into machine code first.
In what version of PHP was OOP functionality first added?
PHP 3.
In what version of PHP was object handling completely rewritten?
PHP 5.
How is internal PHP code embedded in HTML documents?
By inserting the code between the “<?php” and “?>” tags.
How is external PHP code embedded in HTML documents?
<?php include(“script.php”); ?>
What are the three ways of writing comments in PHP?
…
//…, #…, or /* … */
PHP variable names must always be preceded by a ‘$’.
True.
The following unassigned (unbound) variable has what value?
$x;
Null.
The following are both valid print methods:
print “Hello World! < br >”;
echo “Hello World! < br >”;
True.
The following are both valid print methods:
print (“Hello World! < br >”);
echo (“Hello World! < br >”);
True.
The following will print the value stored in $x:
echo “The value is: $x”;
True.
The following will print the value stored in $x:
echo “The value is: “ + $x;
False - this will print ‘0’, as the compiler attempts a numerical addition.
The following will print the value stored in $x:
echo “The value is: “.$x;
True.
The following will print the value stored in $x:
echo “The value is: “, $x;
True.
How many primitive types are there in PHP?
8.
What are the 3 categories of primitive types in PHP?
Scalar types, compound types, and special types.
What are the 4 (primitive) scalar types in PHP?
Boolean, Integer, Double, String.
What are the 2 (primitive) compound types in PHP?
Array and Object.
What are the 2 (primitive) special types in PHP?
Resource and NULL.
Is that ok?');
"); print("b\n");
";