Tutorial by Examples

The var_dump function allows you to dump the contents of a variable (type and value) for debugging. Example: $array = [3.7, "string", 10, ["hello" => "world"], false, new DateTime()]; var_dump($array); Output: array(6) { [0]=> float(3.7) [1]=> ...
If you want PHP to display runtime errors on the page, you have to enable display_errors, either in the php.ini or using the ini_set function. You can choose which errors to display, with the error_reporting (or in the ini) function, which accepts E_* constants, combined using bitwise operators. P...
Warning It is imperative that phpinfo is only used in a development environment. Never release code containing phpinfo into a production environment Introduction Having said that, it can be a useful tool in understanding the PHP environment (OS, configuration, versions, paths, modules) in which ...
Xdebug is a PHP extension which provides debugging and profiling capabilities. It uses the DBGp debugging protocol. There are some nice features in this tool: stack traces on errors maximum nesting level protection and time tracking helpful replacement of standard var_dump() function for displ...
Introduction When working with various libraries and their associated requirements, it is often necessary to know the version of current PHP parser or one of it's packages. This function accepts a single optional parameter in the form of extension name: phpversion('extension'). If the extension in...
// this sets the configuration option for your environment ini_set('display_errors', '1'); //-1 will allow all errors to be reported error_reporting(-1);

Page 1 of 1