What will be the result of the following operation?
array_combine(array("A","B","C"), array(1,2,3));
Which of the following statements about SOAP is NOT true?
Consider the following two files. When you run test.php, what would the output look like?
test.php:
include "MyString.php";
print ",";
print strlen("Hello world!");
MyString.php:
namespace MyFramework\String;
function strlen($str)
{
return \strlen($str)*2; // return double the string length
}
print strlen("Hello world!")
What is the output of the following code?
function z($x) {
return function ($y) use ($x) {
return str_repeat($y, $x);
};
}
$a = z(2);
$b = z(3);
echo $a(3) . $b(2);
Given the following code, what is correct?
function f(stdClass &$x = NULL) { $x = 42; }
$z = new stdClass;
f($z);
var_dump($z);
Your supervisor wants you to disallow PHP scripts to open remote HTTP and FTP resources using PHP's file functions. Which php.ini setting should you change accordingly?
Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?
Which of the following statements is NOT correct?
Given a JSON-encoded string, which code sample correctly indicates how to decode the string to native PHP values?
Which methods can be used to overload object properties? (Choose 2)