1.1 - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of 1.1.php
- <?php
- function digitValue($str){
- $n = filter_var($str, FILTER_SANITIZE_NUMBER_INT);
- $length = strlen($n);
- for ($i = 0; $i < $length; $i++){
- if (is_numeric($n[$i]))
- $zero = $length - $i -1;
- echo $n[$i] . str_repeat(0,$zero) ."\n";
- }
- }
- digitValue('9,327,421');