200-550 無料問題集「Zend-Technologies Zend Certified PHP Engineer」

Which methods can be used to overload object properties? (Choose 2)

正解:C、D 解答を投票する
In the following code, which line should be changed so it outputs the number 2:
class A {
protected $x = array(); /* A */
public function getX() { /* B */
return $this->x; /* C */
}
}
$a = new A(); /* D */ array_push($a->getX(), "one"); array_push($a->getX(), "two"); echo count($a->getX());

How can you determine whether a PHP script has already sent cookies to the client?

Given a PHP value, which sample shows how to convert the value to JSON?

Which of the following statements about exceptions is correct? (Choose 2)

正解:A、C 解答を投票する
What super-global should be used to access information about uploaded files via a POST request?

Given the following code, what will the output be:
trait MyTrait { private $abc = 1; public function increment() { $this->abc++; } public function getValue() { return $this->abc; }
}
class MyClass { use MyTrait; public function incrementBy2() { $this->increment(); $this->abc++; }
}
$c = new MyClass; $c->incrementBy2(); var_dump($c->getValue());

What will the following function call print?
printf('%010.6f', 22);

Transactions are used to...

What is the output of the following code?
class Bar {
private $a = 'b';
public $c = 'd';
}
$x = (array) new Bar();
echo array_key_exists('a', $x) ? 'true' : 'false';
echo '-';
echo array_key_exists('c', $x) ? 'true' : 'false';

In order to create an object storage where each object would be stored only once, you may use which of the following? (Choose 2)

正解:C、E 解答を投票する
Which parts of the text are matched in the following regular expression?
$text = <<<EOT
The big bang bonged under the bung.
EOT;
preg_match_all('@b.n?g@', $text, $matches);

What is the output of the following code?
class Base { protected static function whoami() { echo "Base "; } public static function whoareyou() { static::whoami(); }
}
class A extends Base { public static function test() { Base::whoareyou(); self::whoareyou(); parent::whoareyou();

CORRECT TEXT
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(1);
$two = new Number(2);
$double = $two->mul()->bindTo($one);
echo $double(5);
正解:
5
What is cached by an opcode cache?

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡