3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test_assert($string, $arguments = array()) { // Make sure we don't pass in an empty string. assert('$string !== \'\' && (empty($arguments) || strtr($string, $arguments) !== \'\')'); // Make sure we don't translate unnecessarily. assert('empty($arguments) || strtr($string, $arguments) != implode($arguments)'); } test_assert('@test f', ['@test' => 'test']);
based on YaiGI
Output for 7.2.0
Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/aiOI9 on line 5 Deprecated: assert(): Calling assert() with a string argument is deprecated in /in/aiOI9 on line 7
Output for 5.4.0 - 7.1.10
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/aiOI9 on line 10
Process exited with code 255.