} elseif($cruuent_url_slug == 'php-oops'){ ?> } elseif($cruuent_url_slug == 'javascript'){ ?> } elseif($cruuent_url_slug == 'jquery'){ ?> } elseif($cruuent_url_slug == 'ajax'){ ?> } elseif($cruuent_url_slug == 'codeigniter'){ ?> } elseif($cruuent_url_slug_core == 'laravel'){ ?> } elseif($cruuent_url_slug_core == 'mysql'){ ?> } elseif($cruuent_url_slug == 'node.js'){ ?>
Basically four types of error in php
The parse errors occurs if there is a syntax mistake in the script. The output is parse errors. A parse error stop the execution of the script. There are many reasons for the occurrance of parse error in the php.
Fatal error are caused when php understand what you have written, however what you are asking it to do can't be done. Fatal errors stop the execution of the script. If you are trying to access the undefined functions then the output is fatal error. An example of a Fatal error would be accessing a property of a non-existent object or require() a non-existent file.
Warning errors will not stop the execution of the script. The main reason for warning errors are to include a missing file or using the incorrect number of parameters in a function.
Notice that an error is the same as the warning error. In the notice error execution of the script does not stop. Notice that the error occurs when you try to access the undefined variable then produce a notice error.
PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored.
If you have set a custom error handler function with set_error_handler() then it will still get called, but this custom error handler can (and should) call error_reporting() which will return 0 when the call that triggered the error was preceded by an @.
If the track_errors feature is enabled, any error message generated by the expression will be saved in the variable $php_errormsg. This variable will be overwritten on each error, so check early if you want to use it.
<?php
/* Intentional file error */
$my_file = @file ('non_existent_file') or
die ("Failed opening file: error was '$php_errormsg'");
// this works for any expression, not just functions:
$value = @$cache[$key];
// will not issue a notice if the index $key doesn't exist.
?>
Be aware of using error control operator in statements before include() like this:
<?PHP
(@include("file.php"))
OR die("Could not find file.php!");
?>
This cause, that error reporting level is set to zero also for the included file. So if there are some errors in the included file, they will be not displayed.
Trending Tutorials