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');
based on RWm5Q
Output for 4.3.11 - 7.2.0
Warning: preg_replace(): No ending delimiter '/' found in /in/OX74k on line 13 include_once(.php)
Output for 4.3.0 - 4.3.10
Warning: No ending delimiter '/' found in /in/OX74k on line 13 include_once(.php)