Choose a topic to test your knowledge and improve your PHP skills
How many error levels are available in PHP?
Which version of PHP introduced E_STRICT Error level?
Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?
Which version introduced the function error_get_last()?
Which of the following statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?
Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?
Which logging option’s description is if an error occurs when writing to the syslog, send output to the system console?
Which function is responsible for sending a custom message to the system log?
Which version of PHP was added with Exception handling?
How many methods are available for the exception class?
Which of the following is/are an external data? i) Cookies ii) Input data from a form iii) Server Variables iv) Web services data
Which one of the following filter is used to filter several variables with the same or different filters?
Which one of the following does not describe a validating filter?
What will be the output of the following PHP code? <?php $var=300; $int_options = array("options"=>array ("min_range"=>0, "max_range"=>256)); if (!filter_var($var, FILTER_VALIDATE_INT, $int_options)) echo("Integer is not valid"); else echo("Integer is valid"); ?>
If the input variable is a string like this “http://www.saåånfoøøundry.com/”, the $url variable after the sanitizing will look like?
What will be the output of the following PHP code? <?php $value = 'car'; $result = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE); ?>
What will be the output of the following PHP code? <?php function convertSpace($string) { return str_replace("_", " ", $string); } $string = "Peter_is_a_great_guy!"; echo filter_var($string, FILTER_CALLBACK, array("options"=>"convertSpace")); ?>
PHP has long supported two regular expression implementations known as _______ and _______ i) Perl ii) PEAR iii) Pearl iv) POSIX
[:alpha:] can also be specified as ________
What will be the output of the following PHP code? <?php $username = "jasoN"; if (ereg("([^a-z])",$username)) echo "Username must be all lowercase!"; else echo "Username is all lowercase!"; ?>