3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = assert(true); $b = assert(false); $c = assert('true'); $d = assert('false'); var_dump($a, $b, $c, $d);
Output for 7.0.1 - 7.1.0
Warning: assert(): assert(false) failed in /in/YukF4 on line 3 Warning: assert(): Assertion "false" failed in /in/YukF4 on line 5 bool(true) bool(false) bool(true) bool(false)
Output for 7.0.0
Warning: assert(): assert(false) failed in /in/YukF4 on line 3 Warning: assert(): Assertion "false" failed in /in/YukF4 on line 5 bool(true) NULL bool(true) NULL
Output for 4.3.2 - 5.6.28, hhvm-3.12.0
Warning: assert(): Assertion failed in /in/YukF4 on line 3 Warning: assert(): Assertion "false" failed in /in/YukF4 on line 5 bool(true) NULL bool(true) NULL
Output for hhvm-3.10.0
bool(true) bool(true) bool(true) bool(true)
Output for 4.3.0 - 4.3.1
Warning: assert() [http://www.php.net/function.assert]: Assertion failed in /in/YukF4 on line 3 Warning: assert() [http://www.php.net/function.assert]: Assertion "false" failed in /in/YukF4 on line 5 bool(true) NULL bool(true) NULL