|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-10 17:31 UTC] tony2001@php.net
[2005-11-18 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 04:00:01 2025 UTC |
Description: ------------ This problem only occurs sometimes. I only had it for 5-8 times, but it really drives me crazy for now. I can't explain myself to be such a bad programmer, so it must be a bug. It occurs sometimes in if clauses like: if (isset($a) || isset($b)) { // do something } ..and PHP returns "Fatal error: Call to undefined function () in /index.php on line XX" If the if-clause was "((isset($a)) || (isset($b)))" it helped to remove the additional parenthesis, and do "(isset($a) || isset($b))2 instead. Also the error was eliminated in some cases by adding another side to the expressions, like "((isset($a)==true) || (isset($b)==false))". But for now I'm really fed up with this: $a=isset($_GET['action']); $b=$a && (strpos($_GET['action'], 'admin')===false); if (($a) || ($b)) { echo "if it works or not doesn't matter; the question is if it can be parsed"; } I tried everything but I can't get that expression to work. In antoher case i really wrote TWO if-clauses with only one statement that called one and the same function. Working an above code also revaled that $b becomes unexptected, when writing: if ($a || $b) { echo "if it works or not doesn't matter; the question is if it can be parsed"; } Parse error: parse error, unexpected T_VARIABLE in /index.php on line 353 Anyway, that error occurs only in some bunch of code and cannot really be reproduced with a single file containing above code-snippets. I appreciate appropiate workarounds for that problem ;) PHP Version doesn't matter. I had the problem with PHP 4.x and still have it with 5.04 and 5.1RC3.