PHP errors

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
smoky989
Forum Commoner
Posts: 41
Joined: Mon Sep 02, 2002 1:14 pm

PHP errors

Post by smoky989 »

Is there a program thta can run a PHP script and tell you where the errors are. Kind of like Java compiler? Cause everytime I have a small error it takes me forever to find it. Thanks
oldtimer
Forum Contributor
Posts: 204
Joined: Sun Nov 03, 2002 8:21 pm
Location: Washington State

Post by oldtimer »

Boy that would be nice. Not sure if there is or not. After messing with stuff you tend to know what to look for by the error.
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

what errors are coming up? ust ask about them here, you'll usually get a fast response.

Another good idea is to know PHP back-to-front (but not inside-out) read over the manual a billion times, you'll start to know exactly what the hel errors are real quick.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

php -l scriptfilename.php will only check the syntax of the script. The output is pretty much like that from javac.
Consider using an IDE for php. Most of them show syntax and/or runtime errors and take you to the location in your source.
Take a look e.g. at viewtopic.php?t=3495
Post Reply