php require() will die if the included file has a syntax error even the error line is not executed(i.e., within a function that is not called) for example: file1.php <?php […]

If you do not use header() in your php script, what are the default http headers your browser gets? Here are the http headers php 5.4 generates in the response: […]

Of course, you can put echo or print statements somewhere in the debugged php file to print some messages or value of variables. More convenient way is using an IDE […]

An array can be converted to an object in PHP. <?php $a=array(“aa”,”bb”); $a=(object)$a ?> However you can not access the member of $a because there is not a name for […]

dirname in php may not be what you think it to be: given a full path name of a file, return its directory part. In fact, dirname(pathname) returns the parent […]