3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $js = "function log_me() { console.log('sub2'); } log_me(); function popa() { do_stuff(); } function popa() { do_stuff(); }function popa() { do_stuff(); }function popa() { do_stuff(); }"; $js_pieces = explode('}',$js); foreach($js_pieces as &$js_piece) { if(strpos($js_piece,'function')) { if (preg_match_all('/.*function.*[a-zA-Z_]*\(\)/',$js_piece,$temp_js_arr)) { $js_piece = //' .'.$.' '.$css_li;$temp_js_arr[0] } } }
Output for 5.3.0 - 5.4.29
Parse error: syntax error, unexpected '}' in /in/SgnOH on line 30
Process exited with code 255.