Which string will be returned by the following function call?
$test = '/etc/conf.d/wireless';
substr($test, strrpos($test, '/')); // note that strrpos() is being called, and not strpos()
Which of the following code snippets is correct? (Choose 2)
SimpleXML provides the ability to iterate over items in an XML document, as well as access items within it as if they were object properties. When creating your own classes to access data, implementing which of the following would NOT achieve this goal?
What is the output of the following code?
class C {
public $x = 1;
function __construct() { ++$this->x; }
function __invoke() { return ++$this->x; }
function __toString() { return (string) --$this->x; }
}
$obj = new C();
echo $obj();
What SimpleXML function is used to parse a file?
What is the output of the following code?
class a
{
public $val;
}
function renderVal (a $a)
{
if ($a) {
echo $a->val;
}
}
renderVal (null);
Which of the following is NOT a requirement for file uploads to work?
How many times will the function counter() be executed in the following code?
function counter($start, &$stop)
{
if ($stop > $start)
{
return;
}
counter($start--, ++$stop);
}
$start = 5;
$stop = 2;
counter($start, $stop);
Which of the following is correct? (Choose 2)
What will the following code print out?
$str = '✔ one of the following';
echo str_replace('✔', 'Check', $str);
PDF + Testing Engine
|
---|
$66 |
Testing Engine
|
---|
$50 |
PDF (Q&A)
|
---|
$42 |
Zend Free Exams |
---|
![]() |