PHP 4.0 Bug #4327: feature request: assert()
| From: | jeff at jab dot org | Date: | Thu, 04 May 2000 16:23:26 +0000 |
| Subject: | PHP 4.0 Bug #4327: feature request: assert() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18424@lists.php.net to get a copy of this message | ||
From: jeff@jab.org
Operating system: linux
PHP version: 4.0 Release Candidate 1
PHP Bug Type: Feature/Change Request
Bug description: feature request: assert()
C has a function called assert(booean test), such
that if the test if false, execution is halted
and a callstack is printed, including file and line
numbers. If the test is true, no action is taken.
It is useful for locating bugs in code.
For example, a function that takes argument int x
which should be positive can have in it's code:
assert( x > 0 );
I'd very much like to see such a feature added to
PHP4, as PHP3 is sorely lacking in this area.