3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 0 => [ 'Label 1' => 1, // member C1 'Label 2' => 0, 'Label 3' => 0, ], 1 => [ 'Label 1' => 0, 'Label 2' => 0, 'Label 3' => 1, // member C2 ], 2 => [ 'Label 1' => 0, 'Label 2' => 1, // member C3 'Label 3' => 0, ] ]; ?> <table> <thead> <tr> <td>Label</td> <td>Group</td> </tr> </thead> <tbody> <?php foreach($data[0] as $label => $value): ?> <tr> <td><?php echo $label; ?></td> <td><?php if($value == 1) { echo 'C1'; } if($data[1][$label] == 1) { echo 'C2'; } if($data[2][$label] == 1) { echo 'C3'; } ?></td> </tr> <?php endforeach; ?> </tbody> </table>

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.120.0110.00924.01
8.4.110.0080.01318.56
8.4.100.0120.00818.86
8.4.90.0110.00820.73
8.4.80.0080.00417.62
8.4.70.0100.00917.57
8.4.60.0170.00818.69
8.4.50.0130.00719.31
8.4.40.0060.00319.57
8.4.30.0130.01018.70
8.4.20.0030.00718.99
8.4.10.0070.01319.59
8.3.250.0090.01018.64
8.3.240.0120.00616.97
8.3.230.0120.00716.61
8.3.220.0130.00518.77
8.3.210.0110.00816.83
8.3.200.0040.00516.80
8.3.190.0100.00919.16
8.3.180.0050.00416.46
8.3.170.0120.00618.60
8.3.160.0120.00616.50
8.3.150.0130.00620.68
8.3.140.0090.00916.65
8.3.130.0050.00316.63
8.3.120.0100.00019.04
8.3.110.0090.00920.94
8.3.100.0000.00924.06
8.3.90.0050.00326.77
8.3.80.0060.00316.50
8.3.70.0140.00316.75
8.3.60.0070.00716.75
8.3.50.0160.00918.18
8.3.40.0190.00018.77
8.3.30.0030.01218.71
8.3.20.0050.00224.18
8.3.10.0040.00424.66
8.3.00.0000.00726.16
8.2.290.0080.00920.61
8.2.280.0100.01019.99
8.2.270.0060.01317.36
8.2.260.0060.00918.13
8.2.250.0030.00916.54
8.2.240.0070.00316.96
8.2.230.0080.00022.58
8.2.220.0080.00037.54
8.2.210.0120.00326.77
8.2.200.0080.00016.50
8.2.190.0140.00016.58
8.2.180.0060.00925.92
8.2.170.0160.01022.96
8.2.160.0100.00722.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00419.89
8.2.110.0150.00322.20
8.2.100.0080.00417.84
8.2.90.0060.00318.03
8.2.80.0040.00419.28
8.2.70.0090.00017.75
8.2.60.0000.00817.93
8.2.50.0000.00818.05
8.2.40.0000.00718.28
8.2.30.0000.00718.00
8.2.20.0040.00417.99
8.2.10.0000.00719.34
8.2.00.0040.00419.41
8.1.330.0120.00721.86
8.1.320.0130.00716.20
8.1.310.0110.00316.55
8.1.300.0090.00619.41
8.1.290.0030.00618.88
8.1.280.0070.01025.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00022.05
8.1.230.0130.00020.90
8.1.220.0030.00517.78
8.1.210.0060.00318.77
8.1.200.0000.01017.23
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0060.00318.57
8.1.160.0080.00018.94
8.1.150.0030.00718.89
8.1.140.0030.00818.77
8.1.130.0030.00320.18
8.1.120.0040.00417.48
8.1.110.0060.00317.34
8.1.100.0050.00317.53
8.1.90.0050.00317.50
8.1.80.0030.00717.41
8.1.70.0000.00817.40
8.1.60.0040.00417.57
8.1.50.0040.00417.61
8.1.40.0040.00417.43
8.1.30.0100.00517.70
8.1.20.0120.00417.62
8.1.10.0110.00517.58
8.1.00.0090.00517.45
8.0.300.0030.00320.09
8.0.290.0050.00316.63
8.0.280.0000.00718.55
8.0.270.0070.00018.02
8.0.260.0030.00320.19
8.0.250.0070.00016.92
8.0.240.0000.00716.97
8.0.230.0030.00316.93
8.0.220.0000.00816.87
8.0.210.0020.00516.90
8.0.200.0070.00016.94
8.0.190.0080.00016.97
8.0.180.0030.00317.00
8.0.170.0060.00316.93
8.0.160.0100.00416.89
8.0.150.0080.00716.85
8.0.140.0080.00716.85
8.0.130.0080.00414.98
8.0.120.0100.00416.76
8.0.110.0080.00616.88
8.0.100.0090.00416.83
8.0.90.0100.00316.86
8.0.80.0100.00716.88
8.0.70.0100.00416.84
8.0.60.0080.00716.83
8.0.50.0110.00216.91
8.0.30.0230.00816.82
8.0.20.0240.00616.92
8.0.10.0200.00817.00
8.0.00.0200.00816.98
7.4.330.0020.00215.55
7.4.320.0060.00016.43
7.4.300.0030.00316.46
7.4.290.0050.00316.44
7.4.280.0170.00716.57
7.4.270.0110.00416.51
7.4.260.0120.00314.88
7.4.250.0080.00716.51
7.4.240.0080.00516.54
7.4.230.0080.00516.54
7.4.220.0080.00416.50
7.4.210.0080.00716.38
7.4.200.0080.00316.43
7.4.190.0130.00416.45
7.4.180.0080.01216.64
7.4.160.0170.01016.56
7.4.150.0140.01016.47
7.4.140.0160.00816.49
7.4.130.0190.00516.43
7.4.120.0130.00716.42
7.4.110.0110.01016.43
7.4.100.0170.00616.46
7.4.90.0160.00516.37
7.4.80.0180.00716.47
7.4.70.0130.00816.36
7.4.60.0170.00916.38
7.4.50.0160.01016.42
7.4.40.0200.01016.29
7.4.30.0160.00916.46
7.4.20.0190.00816.46
7.4.10.0170.00916.36
7.4.00.0180.00716.47
7.3.330.0070.00716.12
7.3.320.0100.00314.66
7.3.310.0100.00416.34
7.3.300.0100.00316.34
7.3.290.0110.00816.20
7.3.280.0170.01316.30
7.3.270.0200.00516.22
7.3.260.0180.00716.15
7.3.250.0210.00716.21
7.3.240.0210.00616.27
7.3.230.0190.01016.21
7.3.220.0220.00516.25
7.3.210.0270.00516.20
7.3.200.0170.01116.26
7.3.190.0270.00716.29
7.3.180.0230.00916.20
7.3.170.0250.00116.20
7.3.160.0240.00416.21
7.3.150.0170.01016.20
7.3.140.0160.01416.15
7.3.130.0220.00716.25
7.3.120.0190.00716.25
7.3.110.0170.01016.21
7.3.100.0190.00716.20
7.3.90.0180.00916.52
7.3.80.0180.00616.13
7.3.70.0170.00616.35
7.3.60.0160.00916.43
7.3.50.0160.01016.37
7.3.40.0220.00616.37
7.3.30.0220.00516.37
7.3.20.0640.00716.42
7.3.10.0180.00916.41
7.3.00.0270.00616.36

preferences:
28.87 ms | 403 KiB | 5 Q