200-710 無料問題集「Zend-Technologies Zend Certified Engineer」
Which value will be assigned to the key 0 in this example?
$ too= array(true, '0' => false, false=> true);
$ too= array(true, '0' => false, false=> true);
正解:
true
Which PHP function sets a cookie whose value does not get URL encoded when sending it to the
browser?
browser?
正解:
setrawcookie, setrawcookie()
What is the output of the following code?
class Number {
private $v = 0;
public function _construct($v) { $this->v = $v; }
public function mul() {
return function ($x) { return $this->v * $x; };
$ one = new Number(l);
$ two= new Number(2);
$ double = $two->mul()->bindTo($one);
echo $double(S);
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{l);
$ two= new Number(2);
$ double = $two->mul();
$ x = Closure::bind($double, null, 'Number');
echo $x(5);
class Number {
private $v = 0;
public function _construct($v) { $this->v = $v; }
public function mul() {
return function ($x) { return $this->v * $x; };
$ one = new Number(l);
$ two= new Number(2);
$ double = $two->mul()->bindTo($one);
echo $double(S);
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{l);
$ two= new Number(2);
$ double = $two->mul();
$ x = Closure::bind($double, null, 'Number');
echo $x(5);
正解:
5