3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $current_url = 'current.sub.meh.com'; $stage_url = 'foo.stage.it'; $current_sub_domain = strtok( $current_url, '.' ); $stage_url = "{$current_sub_domain}.{$stage_url}"; echo $stage_url;
Output for 5.6.30, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.3.0rc3
current.foo.stage.it