12m 00s
ID: 367
What is the output of the following PHP script?
$arr1 = ['a' => 'Apple', 'b' => 'Banana']; $arr2 = ['b' => 'Banana', 'a' => 'Australia', 'Apple']; $arr3 = array_diff($arr1, $arr2); $arr4 = array_diff($arr2, $arr1); $keys = array_keys($arr4); echo count($arr3) . ' - ' . $keys[0];
ID: 311
Which of the statements below best describe the following PHP code. Note that backticks are being used (not single quotes).
$output = `ls`;
ID: 119
Which of the following access controls specifies that a feature can be accessed by any other class?
ID: 550
The following code snippet displays what for the resultant array?
$a = array(1 => 0, 3 => 2, 4 => 6); $b = array(3 => 1, 4 => 3, 6 => 4); print_r(array_intersect($a, $b));
ID: 383
In the following code, what is the key of the element with value 25?
$myArray = ['foo' => 'bar', 7 => 15, 28]; $myArray[] = 25;
ID: 103
What is the result of the following code?
function foo() { return array_sum(func_get_args()); } $x = foo(1,2,3); echo ($x ?? 'x');
ID: 9
Which of the below provided options is correct regarding the below code?
$a = array(1, 2, 3); $b = array(1=> 2, 2 => 3, 0 => 1); $c = array('a' => 1,'b' => 2,'c' => 3); var_dump($a == $b); var_dump($a === $b); var_dump($a == $c);
ID: 205
Which of the following is a valid SOAP client call?
$client = new SoapClient("any.wsdl");
$client = new SoapClient;
$client => SoapClient = "any.wsdl";
$client = new SoapClient(null, array());
ID: 55
Which of the following is NOT a valid PHP variable name?
$$a
$_a
$1a
$a
ID: 161
Consider the following PHP script:
<?= "Welcome, {$_POST['name']}.";
What type of attack is possible with this PHP script?