PHP Sandbox Example - 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 PHP Sandbox Example.php
- <?php
- foreach (range(0, 100) as $number_current) {
- $string_output = "";
- if ($number_current % 3 == 0) { // check if current number in the loop is divisibled by 3;
- $string_output .= "Hello\n";
- }
- if ($number_current % 5 == 0) { // check if current number in the loop is divisibled by 5;
- $string_output .= "World\n";
- }
- // print the values
- echo $string_output;
- }