PHP Basics Variable Test

10 Questions | Total Attempts: 2454

SettingsSettingsSettings
Please wait...
PHP Basics Variable Test

This is your description.


Questions and Answers
  • 1. 
    Which of the following is the incorrect way to declare a PHP variable?
    • A. 

      $aVariable;

    • B. 

      $a_Variable = 9;

    • C. 

      $AVariable;

    • D. 

      $a Variable;

  • 2. 
    Which of the following is the incorrect way to declare a PHP variable?
    • A. 

      $a_Number = 9

    • B. 

      $a_Number = 9;

    • C. 

      $a_Num = 9;

    • D. 

      $aNumber = 9;

  • 3. 
    Are the following two variables the same: $yValue = 7; $YValue = 7;
    • A. 

      True

    • B. 

      False

  • 4. 
    Are the following two variables the same: $randomString = “YouTubers”; $randomString = “Google”;
    • A. 

      True

    • B. 

      False

  • 5. 
    PHP variables are case-sensitive?
    • A. 

      True

    • B. 

      False

  • 6. 
    What data type will PHP automatically convert the following variable to:? $aVariable = 99;
    • A. 

      Integer (a number variable)

    • B. 

      string (a text variable)

  • 7. 
    When a variable is declared, it can only be used 1 time in your PHP source file?
    • A. 

      True

    • B. 

      False

  • 8. 
    All variables in PHP start with a $(dollar) sign?
    • A. 

      True

    • B. 

      False

  • 9. 
    What data type will PHP automatically convert the following variable to: $aVariable = “Robert”;
    • A. 

      Integer (a number variable)

    • B. 

      String (a text variable)

  • 10. 
    PHP variables need to be declared before adding a value to it?
    • A. 

      True

    • B. 

      False

Back to Top Back to top