Exercice 3 - 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 Exercice 3.php
- <?php
- function exercice1(int $param) {
- if ($param % 2 == 0)
- {
- echo "pair\n";
- }
- else
- {
- echo "impair\n";
- }
- }
- function exercice3(int $param) {
- for ($i = 0; $i <= $param; $i++)
- {
- echo $i;
- exercice1($i);
- }
- }
- $param1 = 6;
- $param2 = 7;
- exercice3($param);
File Description
- Exercice 3
- PHP Code
- 21 Oct-2021
- 331 Bytes
You can Share it:
Latest PHP Pastes