Zend 200-550 Exam Questions
Zend Certified PHP Engineer (Page 8 )

Updated On: 14-Mar-2026

What 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();

  1. 0
  2. 1
  3. 2
  4. 3

Answer(s): D



CORRECT TEXT
Consider the following code. Which keyword should be used in the line marked with "KEYWORD" instead of "self" to make this code work as intended?
abstract class Base {
protected function __construct() {
}
public static function create() {
return new self(); // KEYWORD
}
abstract function action();
}
class Item extends Base {
public function action() { echo __CLASS__; }
}
$item = Item::create();
$item->action(); // outputs "Item"

  1. static

Answer(s): A



CORRECT TEXT
Which SPL class implements fixed-size storage?

  1. SplFixedArray

Answer(s): A



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

  1. SplFixedArray
  2. SplObjectStorage
  3. SplString
  4. spl_object_hash
  5. spl_same_object

Answer(s): B,D



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();

  1. :whoareyou();
    static::whoareyou();
    }
    public static function whoami() {
    echo "A ";
    }
    }
    class B extends A {
    public static function whoami() {
    echo "B ";
    }
    }
  2. :test();
  3. B B B B B
  4. Base A Base A B
  5. Base B B A B
  6. Base B A A B

Answer(s): C



Viewing page 8 of 46
Viewing questions 36 - 40 out of 223 questions



Post your Comments and Discuss Zend 200-550 exam dumps with other Community members:

200-550 Exam Discussions & Posts

AI Tutor 👋 I’m here to help!