3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $prefix = "/opt/git/repositories/"; $cwd = "/opt/git/repositories/libs/commponent/common"; $gitwebUrl = 'http://packagist.alpari-ru.dom'; if (substr($cwd, 0, strlen($prefix))) { $relative = substr($cwd, length($prefix) + 1); echo "$gitwebUrl/$relative"; } else { echo "error"; }
based on 5X9WH
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function length() in /in/WYAWm:8 Stack trace: #0 {main} thrown in /in/WYAWm on line 8
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Call to undefined function length() in /in/WYAWm on line 8
Process exited with code 255.