note 21937 deleted from function.die by dams
| From: | dams@php.net | Date: | Fri, 31 May 2002 18:58:20 +0000 |
| Subject: | note 21937 deleted from function.die by dams | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-31308@lists.php.net to get a copy of this message | ||
I'm a Perl programmer, so I make the same mistake every time. I write:
do_something_tricky(...) or die "Can't do it!";
... which would work fine in Perl, but in PHP it should be:
do_something_tricky(...) or die("Can't do it!");
Note the parentheses! The first version is so common in Perl that I bet other Perl programmers run
into this all the time.