3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test($disabled)[ if($disabled === 1){ $disabled = 'disabled="disabled"'; }elseif($disabled === 0){ $disabled = ''; } echo '----'.disabled.'---<br />\r\n'; } test(0); test(''); test(1); test('disabled="disabled"');
Output for 5.3.0 - 5.5.6
Parse error: syntax error, unexpected '[', expecting '{' in /in/6AoGu on line 2
Process exited with code 255.