3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $fileNow = "00123"; $counter = 0; while ($fileNow[0] == 0) { $fileNow = substr($fileNow, 1); var_dump('loop iteration: '.(++$counter).', value of $fileNow:', $fileNow); }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(37) "loop iteration: 1, value of $fileNow:" string(4) "0123" string(37) "loop iteration: 2, value of $fileNow:" string(3) "123"