3v4l.org

run code in 300+ PHP versions simultaneously
<?php function display_artistika($int = 100) { for ($i = 0; $x <= $int; $i++) { if (three_and_five($i)) { echo "Inti"; }elseif (three($i) || five($i)) { echo "".three() ? 'Artistika' : 'Solusitama' .""; }else { echo $i; } } } function three_and_five($int) { return three($int) && five($int); } function three($int) { return ($int % 3) == 0; } function five($int) { return ($int % 5) == 0; } display_artistika(); function deret($int) { for ($i = 0; $i <= $int; $i++) { for ($j = 0; $j <= $i; $j++) { echo $j; } echo "\n"; } } deret(6); $a = [ "Inti" , "Artistika", "Solusitama"]; foreach ($a as $str) { echo $str; } function calculate_square($height=0, $width=0) { $f = fopen( 'php://stdin', 'r' ); echo "Tinggi :"; $height = (Int) fread(); echo "n"; echo "Lebar :"; $width = (Int) fread(); echo $height * $width; }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Warning: Undefined variable $x in /in/8mj7j on line 4 Inti Warning: Undefined variable $x in /in/8mj7j on line 4 1 Warning: Undefined variable $x in /in/8mj7j on line 4 2 Warning: Undefined variable $x in /in/8mj7j on line 4 Fatal error: Uncaught ArgumentCountError: Too few arguments to function three(), 0 passed in /in/8mj7j on line 9 and exactly 1 expected in /in/8mj7j:21 Stack trace: #0 /in/8mj7j(9): three() #1 /in/8mj7j(32): display_artistika() #2 {main} thrown in /in/8mj7j on line 21
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: Undefined variable $x in /in/8mj7j on line 4 Inti Warning: Undefined variable $x in /in/8mj7j on line 4 1 Warning: Undefined variable $x in /in/8mj7j on line 4 2 Warning: Undefined variable $x in /in/8mj7j on line 4 Fatal error: Uncaught ArgumentCountError: Too few arguments to function three(), 0 passed in /in/8mj7j on line 9 and exactly 1 expected in /in/8mj7j:21 Stack trace: #0 /in/8mj7j(9): three() #1 /in/8mj7j(32): display_artistika() #2 {main} thrown in /in/8mj7j on line 21
Process exited with code 255.
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.33
Notice: Undefined variable: x in /in/8mj7j on line 4 Inti Notice: Undefined variable: x in /in/8mj7j on line 4 1 Notice: Undefined variable: x in /in/8mj7j on line 4 2 Notice: Undefined variable: x in /in/8mj7j on line 4 Fatal error: Uncaught ArgumentCountError: Too few arguments to function three(), 0 passed in /in/8mj7j on line 9 and exactly 1 expected in /in/8mj7j:21 Stack trace: #0 /in/8mj7j(9): three() #1 /in/8mj7j(32): display_artistika() #2 {main} thrown in /in/8mj7j on line 21
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Inti12 Fatal error: Uncaught ArgumentCountError: Too few arguments to function three(), 0 passed in /in/8mj7j on line 9 and exactly 1 expected in /in/8mj7j:21 Stack trace: #0 /in/8mj7j(9): three() #1 /in/8mj7j(32): display_artistika() #2 {main} thrown in /in/8mj7j on line 21
Process exited with code 255.

preferences:
144.24 ms | 402 KiB | 139 Q