parsing error

From: Date: Wed, 12 Apr 2000 18:45:24 +0000
Subject: parsing error
Groups: php.version4 
Request: Send a blank email to php-version4+get-13464@lists.php.net to get a copy of this message
Howdy folks, I have an annoying bug that makes it hard to debug code. If I have a class that lives in a file that I include or require, and it has an error, I don't get syntax errors for that file properly. I just get an error "Fatal error: Failed opening required '/usr/www/web/htdocs/php_classes/rcClass_test.php' (include_path='') in /usr/www/web/htdocs/test/test.php on line 3" This makes it very difficult to track down problems in classes, which I use a lot of. I would expect to see a syntax error on the specified line in the file that contains my class file. Below is a reproducable example. So for example, have test.php which is <? require($DOCUMENT_ROOT."/php_classes/rcClass_test.php"); $test = new rc_test; $test->testing("help"); ?> <html> <? echo "testing\n"; ?> </html> My class file rcClass_test.php <? class rc_test { function rc_test() { } function testing($value) { //syntax error here no trailing ) if (strlen($value) { return true; } else return false; } } ?> Walt

« previous php.version4 (#13464) next »