хххх - 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
- <?php
- // Функция для возведения числа в степень
- function power($base, $exponent) {
- return pow($base, $exponent);
- }
- // Переменные для примера
- $a = 2;
- $b = 3;
- $c = 4;
- // Вывод результатов для примера
- echo "{$a} в степени {$b} = " . power($a, $b) . "<br>";
- echo "{$a} в степени {$c} = " . power($a, $c) . "<br>";
- // Дополнительные примеры
- echo "5 в степени 2 = " . power(5, 2) . "<br>";
- echo "10 в степени 3 = " . power(10, 3) . "<br>";
- ?>