Which of the following statements are FALSE?
A. SimpleXML allows addition of new nodes.
B. SimpleXML allows addition of new attributes.
C. SimpleXML allows removal of nodes.
D. SimpleXML allows removal of attributes.
E. None of the above
正解:E
質問 2:
Which interfaces could class C implement in order to allow each statement in the following code to work? (Choose 2) $obj = new C();
foreach ($obj as $x => $y) { echo $x, $y; }
A. ArrayObject
B. ArrayAccess
C. IteratorAggregate
D. Iterator
正解:C,D
質問 3:
What is the output of the following code? class Number {
private $v;
private static $sv = 10;
public function __construct($v) { $this->v = $v; }
public function mul() {
return static function ($x) {
return isset($this) ? $this->v*$x : self::$sv*$x;
};
}
}
$one = new Number(1);
$two = new Number(2);
$double = $two->mul();
$x = Closure::bind($double, null, 'Number');
echo $x(5);
A. 5
B. 50
C. Fatal error
D. 10
正解:B
質問 4:
What will be the output value of the following code?
$array = array(1,2,3);
while (list(,$v) = each($array));
var_dump(current($array));
A. Array
B. int(3)
C. int(1)
D. bool(false)
E. NULL
正解:D
質問 5:
Which of the following statements about Reflection is correct?
A. Reflection is an extension that can be disabled
B. Reflection only allows to reflect on built-in classes
C. Built-in classes can be reflected on command line using php --rc <classname>
D. Reflection is a new extension present only in PHP 5.3+
正解:C
質問 6:
Given the following array:
$a = array(28, 15, 77, 43);
Which function will remove the value 28 from $a?
A. array_pull()
B. array_pop()
C. array_unshift()
D. array_shift()
正解:D
質問 7:
When a browser requests an image identified by an img tag, it never sends a Cookie header.
A. TRUE
B. FALSE
正解:B
Kurosawa -
見やすく、200-550勉強しやすい本だと思いました。過去問解説もくわしくて、とても勉強しやすい本でした。