3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function load($namespace) { $nspos = strpos($namespace, "1234"); if( $nspos == -1){ //Nincs benne namespace echo "return false"; } $cropped = substr($namespace, $nspos); $final = preg_replace('/\\\/','/',$cropped) . ".php"; echo "include_once($final)"; } load( '1234\load'); load( '234\load'); load( 'asdf/1234\load'); load( '1234/load'); load( 'ihfiuew\1234/load');
based on p20aT
Output for 4.3.0 - 7.2.0
include_once(1234/load.php)include_once(234/load.php)include_once(1234/load.php)include_once(1234/load.php)include_once(1234/load.php)