3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $roots = array('/www/dev/sites/www.fred-4.com', '/www/dev/sites/www.fred-4.com-master'); foreach ($roots as $root) { $key = substr($root, strpos($root, '.com') 0, 1); echo $root . " -> " . $key . PHP_EOL; }
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '0' (T_LNUMBER) in /in/vQnu6 on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_LNUMBER in /in/vQnu6 on line 8
Process exited with code 255.