What will be the result of the following operation?
array_combine(array("A","B","C"), array(1,2,3));
Answer : C
In the following code, which classes can be instantiated?
abstract class Graphics {
abstract function draw($im, $col);
}
abstract class Point1 extends Graphics {
public $x, $y;
function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
function draw($im, $col) {
ImageSetPixel($im, $this->x, $this->y, $col);
}
}
class Point2 extends Point1 { }
abstract class Point3 extends Point2 { }
Answer : C
What is the output of the following code?
function fibonacci (&$x1 = 0, &$x2 = 1)
{
$result = $x1 + $x2;
$x1 = $x2;
$x2 = $result;
return $result;
}
for ($i = 0; $i < 10; $i++) {
echo fibonacci() . ',';
}
Answer : B
When a query that is supposed to affect rows is executed as part of a transaction, and reports no affected rows, it could mean that: (Choose 2)
Answer : A, B
Which of the following is used to find all PHP files under a certain directory?
Answer : C
Which constant must be passed as the second argument to htmlentities() to convert single quotes (') to HTML entities?
Answer : C
Which of the following filtering techniques prevents all cross-site scripting (XSS) vulnerabilities?
Answer : D