PHP Web Developer Assessment Test

10 Questions | Total Attempts: 12

SettingsSettingsSettings
Please wait...
PHP Web Developer Assessment Test

PHP is probably the most popular server scripting language. Also, PHP is a powerful tool for making dynamic and interactive Web pages. Here is a test to assess your knowledge PHP web development.


Questions and Answers
  • 1. 
    What does libxml_clear_errors() do?
    • A. 

      Retrieve array of errors

    • B. 

      Retrieve last error from libxml

    • C. 

      Remove blank nodes

    • D. 

      Clear libxml error buffer

  • 2. 
    Which constant set small nodes allocation optimization?
    • A. 

      LIBXML_NOENT

    • B. 

      LIBXML_COMPACT

    • C. 

      LIBXML_NOEMPTYTAG

    • D. 

      LIBXML_DTDLOAD

  • 3. 
    Which string function converts a string of ASCII characters to hexadecimal values?
    • A. 

      Addcslashes()

    • B. 

      Addslashes()

    • C. 

      Convert_cyr_string()

    • D. 

      Bin2hex()

  • 4. 
    Which string function(s) converts Hebrew text to visual text?
    • A. 

      Hebrev()

    • B. 

      Hebrevc()

    • C. 

      Hex2bin()

    • D. 

      A and C

    • E. 

      A and B

    • F. 

      B and C

  • 5. 
    Which is used for one-way string hashing?
    • A. 

      Crypt()

    • B. 

      Crc32()

    • C. 

      Hebrevc()

    • D. 

      Count_chars()

  • 6. 
    What is the best practice for running MySQL queries in PHP?
    • A. 

      Use mysql_query() and string escaped variables

    • B. 

      Use mysql_query() and variables with a blacklisting check

    • C. 

      Use PDO prepared statements and parameterized queries

    • D. 

      Use mysql_query() and variables

  • 7. 
    Which of the following will check if a function exists?
    • A. 

      Has_function()

    • B. 

      None of these

    • C. 

      Function_exists()

    • D. 

      $a = “function to check”; if ($a ()) // then function exists

  • 8. 
    What is the best way to send an email using the variables $to, $subject, and $body?
    • A. 

      Sendmail(to,subject,body)

    • B. 

      Mail(to,subject,body)

    • C. 

      Sendmail($to,$subject,$body)

    • D. 

      Mail($to,$subject,$body)

  • 9. 
    What is the difference between Unix and Windows platforms when specifying a path?
    • A. 

      They both use / and \

    • B. 

      They use / only

    • C. 

      They use \ only

    • D. 

      One uses / and \ while the other uses / only

  • 10. 
    Which filesystem function returns a character from an open file?
    • A. 

      Fgetcsv()

    • B. 

      Fgets()

    • C. 

      Fgetss()

    • D. 

      Fgetcsv()