Re: Short circuit evaluation and include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



include and require are not functions.

They are language constructs.

They probably don't "return values" nor short-circuit in the usual way.

Ditto for "echo"

If you can strip the parens and have it still work, it's for sure not a function.

<?php
include_once $file;
echo $file;
?>

is perfectly valid code.

PS
All those disk calls are going to get pretty expensive if your site gets heavy traffic...
You may want to just write a custom error_handler and use include_once which will let you trap the error and do something intelligent with it...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux