Terms Of PHP Test Quiz

15 Questions | Attempts: 1014
Share

SettingsSettingsSettings
PHP Quizzes & Trivia

How far goes your knowlegde in the terms of PHP?


Questions and Answers
  • 1. 
    PHP is client sided.
    • A. 

      True

    • B. 

      False

  • 2. 
    Which data can you track with PHP only? Choose all options that apply.
    • A. 

      Mac adress

    • B. 

      IP adress

    • C. 

      User agent

    • D. 

      Refferal url

    • E. 

      Screen resolution

  • 3. 
    You can execute Linux commands with php on a Linux based server.
    • A. 

      True

    • B. 

      False

  • 4. 
    (int) $i = 1; (int) $j = 2; list($i,$j) = array($j,$i); echo $i; What will be the output?
    • A. 

      1

    • B. 

      2

    • C. 

      3

    • D. 

      4

  • 5. 
    class Animal { public function makeNoise() { echo 'Some kind of noise'; } } class Cat extends Animal { public function makeNoise() { echo 'Meow'; } } $cat = new Cat(); $cat->makeNoise(); What will be the output?
    • A. 

      Some kind of noise

    • B. 

      Meow

    • C. 

      This will give an error

  • 6. 
    class Animal { public final function makeNoise() { echo 'Some kind of noise'; } } class Cat extends Animal { public function makeNoise() { echo 'Meow'; } } $cat = new Cat(); $cat->makeNoise(); What will be the output?
    • A. 

      Some kind of noise

    • B. 

      Meow

    • C. 

      This will give an error

  • 7. 
    Check the ones that are incorrect.
    • A. 

      $1var;

    • B. 

      $var_____;

    • C. 

      $v123456789;

    • D. 

      $var-iable;

    • E. 

      $variƤble;

  • 8. 
    $string = null; if($string === '') { echo 'It works!'; } What will be the output?
    • A. 

      It works!

    • B. 

      There won't be an output!

    • C. 

      This will give an error.

  • 9. 
    class Animal { private $noise = 'Some kind of noise'; public function makeNoise() { echo self::$noise . ' ; woof woof'; } } $animal = new Animal(); $animal->makeNoise(); What will be the output?
    • A. 

      Some kind of noise

    • B. 

      Some kind of noise ; woof woof

    • C. 

      There won't be an output

    • D. 

      This will give an error

  • 10. 
    How do you browse through an array?
    • A. 

      While(array_browse($array) as $key => $value) {}

    • B. 

      Foreach($array as $key => $value) {}

    • C. 

      Array_browse($array as $key => $value) {}

  • 11. 
    You can make images with php.
    • A. 

      True

    • B. 

      False

  • 12. 
    You can decrypt a string made by the md5() method.
    • A. 

      True

    • B. 

      False

  • 13. 
    You can make a zip with php.
    • A. 

      True

    • B. 

      False

  • 14. 
    What is a constructor if you are talking about object orientated programming?
    • A. 

      A function within php that creates php code.

    • B. 

      A pre-defined name of a function that is as first called when initializing an object of that class.

    • C. 

      A method which can create classes.

    • D. 

      A function that can change classes while executing.

  • 15. 
    Is the function preg_replace() or a similar one required to make ubb code?
    • A. 

      Yes

    • B. 

      No

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.