Instantly share code, notes, and snippets.
<?php $digit = 1234; var_dump($digit); printf("%08d\n", $digit);
int(1234) 00001234
Following code is not working given error Invalid numeric literal
Invalid numeric literal
<?php $digit = 09; var_dump($digit); printf("%02d", $digit);
Sorry, something went wrong.
Following code is not working given error
Invalid numeric literal