3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $path="home/satish/Desktop/music/Ae Dil Hai Mushkil (2016) Mp3 Songs[SongsMp3.Com]"; $dirs = explode('/',ltrim($path,"/")); for($i=0;$i<count($dirs);$i++) { echo $dirs[$i]."===>"."$i"; } echo count($dirs);
based on FhF3s
Output for 5.6.0 - 5.6.30, hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.3.0beta1
home===>0satish===>1Desktop===>2music===>3Ae Dil Hai Mushkil (2016) Mp3 Songs[SongsMp3.Com]===>45