What is the purpose of adding a lowercase "u" as a modifier after the final delimiter in a Perl-compatible regular expression?
What is the output of the following code: "<?php $x = 0x22; echo <<<'END' $x END; ?>"
What is the correct PHP command for setting a MySQL connection character set to UTF8?
What is the difference between $a == $b and $a === $b in PHP?
What is the result of the following: $a = (2 == '2') ? true : false; echo $a;
What is the output of the following code? class Foo { private $foo; protected $bar; public $test; public function __construct() { $this->foo = 1; $this->bar = 2; $this->test = 3; } } print_r( (array) new Foo );
What is the value of "n1" and "n2" after executing the following code? var str = "Finding foo in Foo and Bar"; var n1 = str.search("Foo"); var n2 = str.search(/Foo/i);
What is the output of the following code? class angryBob{ public function angryBob(){ $this->apple = "Taken away by Bob"; } } class sillyBill extends angryBob{ var $apple; public function sillyBill() { $this->apple = "Eaten by Bill"; parent::angryBob(); } } $Bill = new sillyBill; echo $Bill->apple;
What is the output of the following code? try { $a = 10/0; echo $a; } catch (Exception $e) { echo 'You cannot divide by ZERO!!'; }
What is the difference between the float and the double type in PHP?
What is default session time in PHP?
What is the output of the following code? $a = '12345'; $a[$a[2]] = 3; echo $a;
What is the correct use of the constant, PHP_EOL?
What is the output of the following code? session_start(); $_SESSION['logged_in'] = true; $_SESSION['name'] = 'Jane'; $_SESSION['level'] = 4; echo session_encode();
What is a type of PHP error severity? (choose all that apply)
What is the best method for sanitizing user input with PHP?
Given this code: function doSomething( &$arg ) { $return = $arg; $arg += 1; return $return; } $a = 3; $b = doSomething( $a ); what is the value of $a and $b after the function call?
What is the output of the following code?echo '1'.print(2) + 3;
What is the output of the following code run using PHP 5.6.0 or higher? const ONE = 1; class foo { const TWO = ONE * 2; const THREE = ONE + self::TWO; const SENTENCE = 'The value of THREE is '.self::THREE; } echo foo::SENTENCE . "\n";
What will be the output of the following code? <?php $xmlFile = "<root><css><element><csstag><title>background-color</title><value>#FFF</value></csstag><csstag><title>color</title><value>#333</value></csstag><csstag><title>font-family</title><value>Verdana, Geneva, sans-serif</value></csstag></element></css></root>"; $xml = simplexml_load_string($xmlFile); foreach($xml->css as $css) { echo (string) $css->element['id']."{"; foreach($xml->css->element->csstag as $tag) { $temp = $tag->title.": ".$tag->value.";"; echo $temp; } echo "}"; } ?>
What is the output from this example? $str = "My name is O\'Connor."; echo stripslashes($str);
What is the recommendation regarding PHP closing tags in a document?
In PHP5, what is the difference between using self and $this, and when is each appropriate?
What is meaning of PEAR?
What is the difference between $name and $$name
What is the output of the following code? function luckyA (&$beebar){ $beebar *= 2; return $beebar; } $x= 4; $y = luckyA($x); $x += 5; echo $x . ', ' . $y;
What is the name of the PHP configuration file?
What is the output of the following code? $foo = 10; $bar = '10'; if ($foo === $bar){ echo 'I ran'; }
What is the opening tag for PHP
what is array_column?
What is the result of the following code? $integer = 5; $string = strval($integer); var_dump($string);
What is the difference between die() and exit() in PHP?
What is the output of the following code? $foo = 400; $bar = 10; echo $foo . "+" . $bar;
What is the output when the following code is executed? <?php function myFun($a) { if (!$a) { throw new Exception('Value init.'); } return 3/$a; } try { echo myFun(3) . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } finally { echo "first\n"; } try { echo myFun(1) . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } finally { echo "second\n"; } echo "Hello PHP Example\n"; ?>
What is the output of the following code? $a='20'; $a -= 5; echo $a++;
In the PHP code given below, what is/are the properties?
What is the output of the following code? $a = "b"; $b = 22; echo $$a + 40;
What is a class in PHP?