3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rows = [ ['id' => 21, 'text' => 't1', 'Mon' => 1], ['id' => 22, 'text' => 't2', 'Mon' => 0], ['id' => 23, 'text' => 't3', 'Mon' => 1], ]; $rowsResult = []; foreach($rows as $index => $row){ if($row['Mon'] == 1){ $rowsResult [$index] = $row; } } var_dump($rowsResult);

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.3.60.0130.01016.63
8.3.50.0090.00516.27
8.3.40.0150.00018.62
8.3.30.0160.00018.54
8.3.20.0040.00420.34
8.3.10.0040.00421.89
8.3.00.0090.00017.25
8.2.180.0090.00618.17
8.2.170.0030.01022.96
8.2.160.0110.00420.23
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0060.00319.95
8.2.110.0100.00021.09
8.2.100.0040.00817.84
8.2.90.0040.00417.97
8.2.80.0060.00318.09
8.2.70.0060.00317.63
8.2.60.0030.00517.63
8.2.50.0000.00817.63
8.2.40.0090.00017.62
8.2.30.0030.00619.34
8.2.20.0000.00718.13
8.2.10.0030.00618.18
8.2.00.0040.00418.18
8.1.280.0160.00625.92
8.1.270.0070.00022.02
8.1.260.0050.00326.35
8.1.250.0030.00628.09
8.1.240.0030.00622.23
8.1.230.0040.00820.86
8.1.220.0000.00817.79
8.1.210.0030.00718.95
8.1.200.0040.00417.47
8.1.190.0030.00617.23
8.1.180.0050.00318.10
8.1.170.0000.00718.90
8.1.160.0050.00218.93
8.1.150.0070.00020.71
8.1.140.0040.00419.58
8.1.130.0000.00720.20
8.1.120.0000.00717.50
8.1.110.0040.00417.46
8.1.100.0030.00617.41
8.1.90.0040.00417.51
8.1.80.0050.00217.32
8.1.70.0070.00017.46
8.1.60.0000.00817.58
8.1.50.0000.00817.48
8.1.40.0040.00417.54
8.1.30.0000.00817.63
8.1.20.0040.00417.71
8.1.10.0080.00017.38
8.1.00.0000.00717.41
8.0.300.0040.00420.04
8.0.290.0090.00016.75
8.0.280.0030.00318.45
8.0.270.0000.00817.21
8.0.260.0030.00320.17
8.0.250.0070.00017.00
8.0.240.0070.00016.96
8.0.230.0030.00616.97
8.0.220.0070.00016.93
8.0.210.0030.00316.80
8.0.200.0000.00716.93
8.0.190.0000.00816.98
8.0.180.0050.00316.84
8.0.170.0050.00316.92
8.0.160.0050.00316.84
8.0.150.0000.00716.79
8.0.140.0030.00416.87
8.0.130.0060.00013.32
8.0.120.0070.00016.74
8.0.110.0000.00716.77
8.0.100.0040.00416.85
8.0.90.0040.00416.74
8.0.80.0060.01216.84
8.0.70.0040.00416.79
8.0.60.0040.00416.77
8.0.50.0070.00016.93
8.0.30.0090.00916.85
8.0.20.0100.00917.40
8.0.10.0040.00416.96
8.0.00.0130.00316.88
7.4.330.0050.00015.55
7.4.320.0000.00716.50
7.4.300.0000.00716.63
7.4.290.0030.00616.44
7.4.280.0070.00016.45
7.4.270.0040.00416.50
7.4.260.0030.00313.27
7.4.250.0000.00716.43
7.4.240.0040.00416.61
7.4.230.0000.00716.49
7.4.220.0050.00216.49
7.4.210.0060.00616.49
7.4.200.0000.00716.47
7.4.160.0130.00316.46
7.4.150.0130.00617.40
7.4.140.0110.00717.86
7.4.130.0120.00616.39
7.4.120.0090.01216.45
7.4.110.0070.01416.44
7.4.100.0170.00616.44
7.4.90.0160.00316.73
7.4.80.0040.01319.39
7.4.70.0120.00616.46
7.4.60.0040.01416.36
7.4.50.0120.00316.53
7.4.40.0080.00816.55
7.4.30.0090.01116.64
7.4.00.0030.00914.96
7.3.330.0030.00313.16
7.3.320.0050.00013.23
7.3.310.0000.00716.40
7.3.300.0030.00316.21
7.3.290.0070.01416.31
7.3.280.0100.00816.35
7.3.270.0140.00317.40
7.3.260.0090.01016.48
7.3.250.0120.00816.41
7.3.240.0100.01016.47
7.3.230.0070.01416.55
7.3.210.0040.01316.45
7.3.200.0140.00316.71
7.3.190.0100.00716.39
7.3.180.0100.00716.42
7.3.170.0100.00616.56
7.3.160.0030.01316.28
7.3.10.0020.01116.68
7.3.00.0070.00516.56
7.2.330.0120.00616.75
7.2.320.0140.00716.50
7.2.310.0070.01016.79
7.2.300.0140.00316.68
7.2.290.0080.00816.45
7.2.130.0030.00916.91
7.2.120.0030.01116.97
7.2.110.0100.00516.96
7.2.100.0060.00616.89
7.2.90.0080.00316.90
7.2.80.0060.01116.92
7.2.70.0020.01217.08
7.2.60.0060.00717.03
7.2.50.0060.00917.02
7.2.40.0040.00817.01
7.2.30.0080.00816.78
7.2.20.0110.00216.87
7.2.10.0040.00616.90
7.2.00.0050.01017.64
7.1.250.0050.00315.67
7.1.200.0040.00415.85
7.1.100.0000.01218.01
7.1.70.0200.00715.28
7.1.60.0240.01033.14
7.1.50.0290.00732.99
7.1.40.0220.01332.61
7.1.30.0340.00332.52
7.1.20.0360.00732.86
7.1.10.0060.01216.50
7.1.00.0070.00716.60
7.0.200.0160.00614.88
7.0.190.0130.01014.80
7.0.180.0130.01014.33
7.0.170.0190.00314.33
7.0.160.0150.00614.50
7.0.150.0040.00716.14
7.0.140.0090.00316.34
7.0.130.0050.00916.43
7.0.120.0080.00416.60
7.0.110.0000.01216.36
7.0.100.0060.00616.50
7.0.90.0030.00916.48
7.0.80.0060.00616.38
7.0.70.0030.01216.31
7.0.60.0040.00816.10
7.0.50.0030.00916.39
7.0.40.0090.00316.44
7.0.30.0030.01216.36
7.0.20.0080.00416.63
7.0.10.0040.00816.30
7.0.00.0080.00316.31

preferences:
48.85 ms | 400 KiB | 5 Q