3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 0; for ($i = 0; $i < 5; ++$i) var_dump(++$a); for ($i = 0; $i < 5; ++$i) var_dump(str_pad(++$a, 3, '0', STR_PAD_LEFT));
Output for 7.1.7
int(1) int(2) int(3) int(4) int(5) string(3) "006" string(3) "007" string(3) "008" string(3) "009" string(3) "010"