1. Question: ______ methods can be accessed from anywhere at any time.

    A
    Public

    B
    Private

    C
    Protected

    D
    All

    E
    none

    Note: Not available
    1. Report
  2. Question: Type hinting only works for _______

    A
    objects

    B
    arrays

    C
    all

    D
    variables

    Note: Not available
    1. Report
  3. Question: Which of the following option is true?

    A
    Constructors can accept parameters, which are assigned to specific object properties at creation time.

    B
    Constructors can call class methods or other functions.

    C
    Class constructors can call on other constructors, including those from the class parent.

    D
    All

    Note: Not available
    1. Report
  4. Question: Which is/are class property scope in php?

    A
    public

    B
    private

    C
    final

    D
    static

    Note: Not available
    1. Report
  5. Question: Whic type of scope is only accessible by subclass?

    A
    private

    B
    protected

    C
    public

    D
    final

    Note: Not available
    1. Report
  6. Question: If visibility is not defined for a method/member then it is treated as public static.

    A
    True

    B
    False

    Note: Not available
    1. Report
  7. Question: What will be output of the following code?
    class test{
      private $a;
      function set($x){
       $this->a =$x;
      }
      public function get(){
       return $this->a;
      }
    }
    
    $t1 = new test;
    $t1->set(10);
    echo $t1->get();

    A
    0

    B
    10

    C
    Error

    D
    None

    Note: Not available
    1. Report
  8. Question: What are the three access modifiers that you can use in PHP objects?

    A

    B

    C

    D

    E

    Note: Not available
    1. Report
  9. Question: When checking to see if two variables contain the same instance of an object, which of the following comparisons should be used?

    A

    B

    C

    D

    E

    Note: Not available
    1. Report
  10. Question: In PHP 5 you can use the ______ operator to ensure that an object is of a particular type. You can also use _______ in the function declaration.

    A

    B

    C

    D

    E

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