3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = "1"; echo $x; // will output "1" $y = str_pad($x, 2, "0", STR_PAD_LEFT); echo $y; // will output "01"

preferences:
31.01 ms | 402 KiB | 5 Q