3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $path = "\\/var\\/www\\/resources"; $pathChunks = explode("/", $path); print_r($pathChunks); $len = count($pathChunks); $storageFolder = $pathChunks[$len-1]; if(strlen($storageFolder) == 0) { $storageFolder = $pathChunks[$len-2] } print_r($storageFolder); ?>
Output for 5.3.25 - 5.3.26, 5.4.16
Parse error: syntax error, unexpected '}' in /in/M87Ip on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.24, 5.4.0 - 5.4.15
Parse error: syntax error, unexpected '}' in XBvmt on line 9
Process exited with code 255.