Ing De Sistemas
El presente listado muestra unas preguntas que pueden ser tomadas como base para preparar el examen de certificación PHP desarrollado por ZEND.
*
* 1 Which of the following tags are an acceptable way to begin a PHP Code block?
-------------------------------------------------
Principio del formulario
* <SCRIPTLANGUAGE="php">
* <!
* <%
* <?php
* <?
Choose 4 answers || Final del formulario
* 2 Which of the following are valid PHP variables?
-------------------------------------------------
Principio del formulario
* @$foo
* &$variable
* ${0x0}
* $variable
* $0x0
Choose 4 answers ||Final del formulario
* 3 What is the best way to iterate and modify every element of an array using PHP 5?
-------------------------------------------------
Principio del formulario
* You cannot modify an array during iteration
* for($i = 0; $i < count($array); $i++) { /* ... */ }
* foreach($array as $key => &$val) { /* ... */ }
* foreach($array as $key => $val){ /* ... */ }
* while(list($key, $val) = each($array)) { /* ... */
Choose 1 answer
* 4 What is the output of the following PHP code?
<?php
define('FOO', 10);
$array = array(10 => FOO,
"FOO" => 20);
print $array[$array[FOO]] * $array["FOO"];
?>
-------------------------------------------------
Principio del formulario* FOO
* 100
* 200
* 20
* 10
Choose 1 answer ||Final del formulario
* 5 What is the output of the following PHP script?
<?php
$a = 1;
$b = 2.5;
$c = 0xFF;
$d = $b + $c;
$e = $d * $b;
$f = ($d + $e) % $a;
print ($f + $e);
?>
-------------------------------------------------
Principio del formulario
*643.75
* 432
* 643
* 257
* 432.75
Choose 1 answer ||Final del formulario
6 What combination of boolean values for $a, $b, $c, and $d will result in the variable $number being equal to 3?
<?php
$a = null;
$b = null;
$c = null;
$d = null;
if($a && !$b) {
if(!!$c && !$d) {
if($d && ($a || $c)) {if(!$d && $b) {
$number = 1;
} else {
$number = 2;
}
} else {
$number = 3;
}
} else {
$number = 4;
}
} else {
$number = 5;
}
?>
-------------------------------------------------
Principio del formulario
* false, true, true, true
* true, false, true, false
* true, true, false, false
* false, true,true, false
* false, false, true, false
Choose 1 answer || Final del formulario
7 What is the output of the following code?
<?php
$string = "111221";
for($i = 0; $i < strlen($string); $i++) {
$current = $string[$i];
$count = 1;
while(isset($string[$i + $count]) && ($string[$i + $count] == $current)) $count++;$newstring .= "$count{$current}";
$i += $count-1;
}
print $newstring;
?>
-------------------------------------------------
Principio del formulario
* 312211
* 3312212
* 11221221
* 221131
* 3211122
Choose 1 answer ||Final del formulario
8 What is the best way to ensure that a user-defined function is always passed an object as its single parameter?-------------------------------------------------
Principio del formulario
* function myfunction(stdClass $a)
* function myfunciton($a = stdClass)
* Use is_object() within the function
* There is no way to ensure the parameter will be an object
* function myfunction(Object $a)
Choose 1 answer || Final del formulario
9 What does the following function do,...
Regístrate para leer el documento completo.