3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = ['Porto', 'Benfica', 'Maritimo', 'Sporting']; foreach($times as $m => $mandante) { foreach($times as $v => $visitante) { if ($times[$m] != $times[$v]) { $partidas[] = array($times[$m], $times[$v]); } } } foreach ($partidas as $p => $partida) { if (array_reverse($primeiro_turno[$p]) != $partida) { $primeiro_turno[] = $partida; } else { $segundo_turno[] = $partida; } } print var_dump($partidas); print 'PRIMEIRO TURNO'; print var_dump($primeiro_turno); print 'SEGUNDO TURNO'; print var_dump($segundo_turno);
Output for git.master, git.master_jit
Warning: Undefined variable $primeiro_turno in /in/1NUgi on line 12 Warning: Trying to access array offset on value of type null in /in/1NUgi on line 12 Fatal error: Uncaught TypeError: array_reverse(): Argument #1 ($array) must be of type array, null given in /in/1NUgi:12 Stack trace: #0 /in/1NUgi(12): array_reverse(NULL) #1 {main} thrown in /in/1NUgi on line 12
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $primeiro_turno in /in/1NUgi on line 12 Warning: Trying to access array offset on null in /in/1NUgi on line 12 Fatal error: Uncaught TypeError: array_reverse(): Argument #1 ($array) must be of type array, null given in /in/1NUgi:12 Stack trace: #0 /in/1NUgi(12): array_reverse(NULL) #1 {main} thrown in /in/1NUgi on line 12
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.04 ms | 401 KiB | 8 Q