1. 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
  2. Question: In PHP 5's object model, a class can have multiple ______ but only a single direct ________.

    A
    None

    B
    interfaces, child

    C
    children, interface

    D
    interfaces, parent

    E
    parents, interface

    Note: Not available
    1. Report
  3. 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
  4. Question: The _______ method will be called automatically when an object is represented as a string.

    A
    getString()

    B
    __get()

    C
    __value()

    D
    __toString()

    E
    __getString()

    Note: Not available
    1. Report
  5. 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
    __destroy()

    B
    __serialize()

    C
    __destruct()

    D
    __shutdown()

    E
    __sleep()

    Note: Not available
    1. Report
  6. Question: What is the output of the following code?
    <?php
    
    class MyException extends Exception {}
    class AnotherException extends MyException {}
    
    class Foo {
      public function something() {
        throw new AnotherException();
      }
      public function somethingElse() {
        throw new MyException();
      }
    }
    
    $a = new Foo();
    
    try {
      try {
        $a->something();	
      } catch(AnotherException $e) {
        $a->somethingElse();	
      } catch(MyException $e) {
        print "Caught Exception";
      }
    } catch(Exception $e) {
      print "Didn't catch the Exception!";
    }
    
    ?>

    A
    "Caught Exception" followed by "Didn't catch the Exception!"

    B
    A fatal error for an uncaught exception

    C
    "Didn't catch the Exception!"

    D
    "Didn't catch the Exception!" followed by a fatal error

    E
    "Caught Exception"

    Note: Not available
    1. Report
  7. Question: Which two internal PHP interfaces provide functionality which allow you to treat an object like an array?

    A
    iteration

    B
    arrayaccess

    C
    objectarray

    D
    iterator

    E
    array

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