Re: [PHP4BETA] require bug.
| From: | Zeev Suraski | Date: | Thu, 10 Jun 1999 05:11:12 +0000 |
| Subject: | Re: [PHP4BETA] require bug. | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-1443@lists.php.net to get a copy of this message | ||
At 00:55 10/06/99 , Yann Doussot wrote:
On Wed, 9 Jun 1999, Zeev Suraski wrote: What's that colon? I got a parse error with that colon, and it worked fine without it. I'd guess that you have error_reporting set to a low value in your php3.ini, and since the values of error_reporting changed in version 4.0, you're not seeing parse errors, thus, no output.Ok, that's actually a known incompatibility (known to Andi and me anyway:), an incompatibility we intend to sort out. Since require() is compile-time, you can't give it a string that's composed of variables (it almost always makes no sense, and should be replaced with include()). We intend to improve Zend so that it automatically considers these statements as include statements to improve downwards compatibility. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.ilOk did not see this one. In fact I was trying to produce a testcase for a bug I found in a one of my application. A page does not produce any output (even with high error_reporting), the same page works with PHP3. Here is another one that fails to produce any output (this an extract from a bigger script): Hello <? Error_reporting(1023); $open = 1; if ($open == 0) {require("docs/$user_lang/dossier.dml"); echo "<p><font color=\"#007F7F\">", $dict["opened_projects"],":</font>\n"; } elseif ($open == 1) {require("docs/$user_lang/running.dml"); echo "<p><font color=\"#F62500\">", $dict["finished_projects"],":</font>\n"; }; ?>