3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputArduino = 17; var_dump(unparserPlayerRounds($inputArduino)); function unparserPlayerRounds(int $bitNumber): array { $playerArray = []; $players = [ 32 => 'Player 6', 16 => 'Player 5', 8 => 'Player 4', 4 => 'Player 3', 2 => 'Player 2', 1 => 'Player 1', ]; while($bitNumber !== 0) { foreach ($players as $bitValue => $player) { if ($bitNumber >= $bitValue) { $playerArray[] = $player; $bitNumber -= $bitValue; } } } return $playerArray; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.20.0140.00719.30
8.4.10.0090.00019.19
8.3.150.0110.00717.07
8.3.140.0000.00816.79
8.3.130.0060.00316.53
8.3.120.0330.00716.70
8.3.110.0360.00616.50
8.3.100.0390.00816.40
8.3.90.0300.01316.78
8.3.80.0410.00616.21
8.3.70.0400.00716.63
8.3.60.0390.00616.43
8.3.50.0370.01016.67
8.3.40.0320.01017.43
8.3.30.0320.00817.40
8.3.20.0310.00717.41
8.3.10.0210.01717.11
8.3.00.0040.01817.72
8.2.260.0030.00617.30
8.2.250.0040.00416.54
8.2.240.0260.01316.60
8.2.230.0250.01416.55
8.2.220.0290.01116.70
8.2.210.0300.00716.14
8.2.200.0280.00616.32
8.2.190.0230.01316.23
8.2.180.0300.00916.46
8.2.170.0420.00017.51
8.2.160.0400.01017.41
8.2.150.0390.00917.53
8.2.140.0350.00717.46
8.2.130.0250.01617.58
8.2.120.0260.01617.58
8.2.110.0300.01317.59
8.2.100.0270.01517.64
8.2.90.0370.00317.45
8.2.80.0280.01517.39
8.2.70.0300.01117.40
8.2.60.0370.00417.59
8.2.50.0310.00817.31
8.2.40.0340.00017.52
8.2.30.0300.00617.48
8.2.20.0410.00917.38
8.2.10.0340.00017.27
8.2.00.0210.01517.65
8.1.310.0080.00018.55
8.1.300.0410.00015.72
8.1.290.0300.00915.93
8.1.280.0320.00815.95
8.1.270.0270.01017.33
8.1.260.0390.00017.02
8.1.250.0350.00717.39
8.1.240.0250.01217.34
8.1.230.0270.01017.30
8.1.220.0310.00617.31
8.1.210.0310.01017.05
8.1.200.0230.01016.92
8.1.190.0260.00616.85
8.1.180.0310.01017.01
8.1.170.0340.00617.06
8.1.160.0260.00917.12
8.1.150.0270.00417.10
8.1.140.0330.00316.99
8.1.130.0280.00317.11
8.1.120.0280.00617.28
8.1.110.0290.00917.06
8.1.100.0180.01817.29
8.1.90.0290.00717.24
8.1.80.0280.00917.26
8.1.70.0320.00616.81
8.1.60.0310.00917.38
8.1.50.0380.01017.28
8.1.40.0400.00717.19
8.1.30.0140.00617.44
8.1.20.0250.01517.63
8.1.10.0390.00617.33
8.1.00.0250.00717.26

preferences:
36.55 ms | 403 KiB | 5 Q