1. Question: How can you modify the copy of an object during a clone operation?

    A
    Put the logic in the object's constructor to alter the values

    B

    C
    Implement the object's __clone() method

    D

    E

    Note: Not available
    1. Report
  2. Question: What is the primary difference between a method declared as static and a normal method?

    A
    Static methods can only be called using the :: syntax and never from an instance

    B
    Static methods do not provide a reference to $this

    C
    Static methods cannot be called from within class instances

    D

    E
    There is no functional difference between a static and non-static method

    Note: Not available
    1. Report
  3. Question: What is the output of the following script?

    <?php

    class ClassOne {
    protected $a = 10;

    public function changeValue($b) {
    $this->a = $b;
    }
    }

    class ClassTwo extends ClassOne {

    protected $b = 10;

    public function changeValue($b) {
    $this->b = 10;
    parent::changeValue($this->a + $this->b);
    }

    public function displayValues() {
    print "a: {$this->a}, b: {$this->b}\n";
    }
    }

    $obj = new ClassTwo();

    $obj->changeValue(20);
    $obj->changeValue(10);

    $obj->displayValues();

    ?>

    A

    B

    C

    D

    E
    a: 10, b: 10

    Note: Not available
    1. Report
  4. Question: The ______ keyword is used to indicate an incomplete class or method, which must be further extended and/or implemented in order to be used.

    A

    B

    C

    D

    E

    Note: Not available
    1. Report
  5. Question: To ensure that a given object has a particular set of methods, you must provide a method list in the form of an ________ and then attach it as part of your class using the ________keyword.

    A
    array, interface

    B
    interface, implements

    C
    interface, extends

    D
    instance, implements

    E
    access-list, instance

    Note: Not available
    1. Report
  6. Question: Type-hinting and the instanceof keyword can be used to check what types of things about variables?

    A
    If a particular child class extends from it

    B
    If they are an instance of a particular interface

    C
    If they are an abstract class

    D
    If they have a particular parent class

    E
    If they are an instance of a particular class

    Note: Not available
    1. Report
  7. Question: In PHP 5's object model, a class can have multiple ______ but only a single direct
    ________.

    A

    B

    C

    D

    E

    Note: Not available
    1. Report
  8. Question: What three special methods can be used to perform special logic in the event a particular accessed method or member variable is not found?

    A
    __get($variable)

    B
    __call($method, $params)

    C
    __get($method)

    D
    __set($variable, $value)

    E
    __call($method)

    Note: Not available
    1. Report
  9. Question: The _______ method will be called automatically when an object is represented as a string.

    A

    B

    C
    __value()

    D

    E

    Note: Not available
    1. Report
  10. Question: When an object is serialized, which method will be called, automatically, providing your object with an opportunity to close any resources or otherwise prepare to be serialized?

    A

    B

    C

    D

    E

    Note: Not available
    1. Report
Copyright © 2025. Powered by Intellect Software Ltd