3v4l.org

run code in 200+ 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(); }"; print_r(explode('}',$js));
Output for 4.3.0 - 7.2.0
Array ( [0] => function log_me() { console.log('sub2'); [1] => log_me(); function popa() { do_stuff(); [2] => function popa() { do_stuff(); [3] => function popa() { do_stuff(); [4] => function popa() { do_stuff(); [5] => )