Given a DateTime object that is set to the first second of the year 2014, which of the following samples will correctly return a date in the format '2014-01-01 00:00:01'?
A. $datetime->format('%Y-%m-%d %h:%i:%s')How many times will the function counter() be executed in the following code?
function counter($start, and$stop)
{
if ($stop > $start)
{
return;
}
counter($start--, ++$stop);
}
$start = 5;
$stop = 2;
counter($start, $stop);
A. 3What will an opcode cache ALWAYS automatically improve?
A. Running time of a loop in a PHP scriptAn unbuffered database query will: (Choose 2)
A. Return the first data fasterIn order to create an object storage where each object would be stored only once, you may use which of the following? (Choose 2)
A. SplFixedArrayWhat 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();
B. 1Consider the following table data and PHP code. What is the outcome?
Table data (table name "users" with primary key "id"):
id name email
1 anna [email protected]
2 betty [email protected]
3 clara [email protected]
5 sue [email protected]
PHP code (assume the PDO connection is correctly established):
$dsn = 'mysql:host=localhost;dbname=exam';
$user = 'username';
$pass = '********';
$pdo = new PDO($dsn, $user, $pass);
$cmd = "SELECT * FROM users WHERE id = :id";
$stmt = $pdo->prepare($cmd);
$id = 3;
$stmt->bindParam('id', $id);
$stmt->execute();
$stmt->bindColumn(3, $result);
$row = $stmt->fetch(PDO::FETCH_BOUND);
A. The database will return no rows.You need to escape special characters to use user input inside a regular expression. Which functions would you use? (Choose 2)
A. addslashes()What is the method used to execute XPath queries in the SimpleXML extension?
A. xpathQuery()What is the output of the following code?
for ($i = 0; $i < 1.02; $i += 0.17) {
$a[$i] = $i;
}
echo count($a);
B. 1Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Zend exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 200-550 exam preparations and Zend certification application, do not hesitate to visit our Vcedump.com to find your solutions here.