3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dir = array(); $dir[] = '/dir/dva'; $dir[] = '//dir\dva'; $dir[] = '\dir\dva'; $dir[] = '\\\\dir\dva'; $dir[] = '\/dir\dva'; $dir[] = '/\dir\dva'; foreach ($dir as $value) { echo ltrim($value, '/') . "\n"; echo ltrim($value, '\\') . "\n"; echo ltrim($value, '\/') . "\n"; echo ltrim($value, '/\\') . "\n"; echo "\n\n" }
Output for 5.3.0 - 5.4.23
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/TARkn on line 19
Process exited with code 255.