<?php$a = 123456;$arr = array_pad(str_split($a), -7, "");var_dump($arr);?>
Standard input is empty
array(7) { [0]=> string(0) "" [1]=> string(1) "1" [2]=> string(1) "2" [3]=> string(1) "3" [4]=> string(1) "4" [5]=> string(1) "5" [6]=> string(1) "6" }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!