3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $b = 'echo "OK";'; $a='f();function f($_=1){if($_==1)return;'.$b.'}'; assert($a); f(2);
Output for 7.2.0
Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/nHBO4 on line 5 Warning: assert(): assert($a): "f();function f($_=1){if($_==1)return;echo "OK";}" failed in /in/nHBO4 on line 5 OK
Output for 7.0.0 - 7.1.10
Warning: assert(): assert($a): "f();function f($_=1){if($_==1)return;echo "OK";}" failed in /in/nHBO4 on line 5 OK
Output for 4.3.2 - 5.6.28
Warning: assert(): Assertion "f();function f($_=1){if($_==1)return;echo "OK";}" failed in /in/nHBO4 on line 5 OK
Output for 4.3.0 - 4.3.1
Warning: assert() [http://www.php.net/function.assert]: Assertion "f();function f($_=1){if($_==1)return;echo "OK";}" failed in /in/nHBO4 on line 5 OK