Enabler PHP natives assertion in debug and use Platal::assert() as a
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 27 Feb 2011 18:38:13 +0000 (19:38 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 27 Feb 2011 18:38:13 +0000 (19:38 +0100)
commitc4bcb1697481d3a6549f228739f17dc081641491
tree97ae9ff5d3a026fe24231cbbf0b921a961aeb907
parentddfd5a088e3aa77b6e0194b1fcb530ef948cdd5b
Enabler PHP natives assertion in debug and use Platal::assert() as a
backend when assertions fail.

Thus, you can write the following code:
 assert ('$toto != blah')

If you run in debug mode, this will be evaluated and will raise an
exception in case of error. If you run in production mode, this will juste
be skipped.

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/plglobals.php
include/platal.inc.php