3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [0, 1, 2]; for($i = 0; $i <= 2; $i++){ $filtered = array_values(array_filter($array, function($elem) use ($i){ return ($elem == $i); })); var_dump($filtered); }

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.110.0030.00616.62
8.3.100.0060.00316.63
8.3.90.0090.00926.77
8.3.80.0030.00616.75
8.3.70.0120.00616.75
8.3.60.0120.00318.55
8.3.50.0060.01618.16
8.3.40.0090.00618.68
8.3.30.0030.01218.55
8.3.20.0040.00421.73
8.3.10.0060.00319.10
8.3.00.0070.00021.91
8.2.230.0080.00020.94
8.2.220.0090.00024.06
8.2.210.0080.01226.77
8.2.200.0090.00018.16
8.2.190.0140.00716.58
8.2.180.0060.00916.75
8.2.170.0110.00422.96
8.2.160.0030.01020.43
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00826.16
8.2.110.0030.00619.31
8.2.100.0130.00019.57
8.2.90.0040.00417.88
8.2.80.0000.00818.03
8.2.70.0080.00018.03
8.2.60.0040.00418.22
8.2.50.0000.00918.10
8.2.40.0030.00619.30
8.2.30.0000.00720.54
8.2.20.0040.00418.06
8.2.10.0000.00818.99
8.2.00.0030.00518.17
8.1.290.0030.00630.84
8.1.280.0080.00825.92
8.1.270.0060.00321.97
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0080.00323.83
8.1.230.0120.00022.76
8.1.220.0040.00417.74
8.1.210.0040.00418.97
8.1.200.0060.00317.35
8.1.190.0060.00317.35
8.1.180.0080.00018.10
8.1.170.0000.00818.50
8.1.160.0000.00718.81
8.1.150.0000.00718.75
8.1.140.0000.00718.80
8.1.130.0000.00820.29
8.1.120.0000.00717.49
8.1.110.0040.00417.52
8.1.100.0030.00517.41
8.1.90.0060.00317.50
8.1.80.0090.00017.36
8.1.70.0000.00817.38
8.1.60.0080.00017.50
8.1.50.0000.00817.41
8.1.40.0000.00917.51
8.1.30.0030.00517.72
8.1.20.0040.00417.62
8.1.10.0080.00017.45
8.1.00.0070.00017.28
8.0.300.0000.00719.55
8.0.290.0050.00216.75
8.0.280.0030.00318.50
8.0.270.0000.00817.19
8.0.260.0050.00318.45
8.0.250.0030.00316.85
8.0.240.0030.00516.95
8.0.230.0070.00316.97
8.0.220.0030.00316.89
8.0.210.0090.00016.91
8.0.200.0030.00516.99
8.0.190.0000.00916.84
8.0.180.0040.00416.84
8.0.170.0040.00416.82
8.0.160.0000.00816.94
8.0.150.0000.00716.71
8.0.140.0040.00416.90
8.0.130.0000.00613.24
8.0.120.0000.00816.88
8.0.110.0050.00316.95
8.0.100.0040.00416.88
8.0.90.0040.00416.89
8.0.80.0080.00716.86
8.0.70.0040.00416.84
8.0.60.0000.00816.70
8.0.50.0000.00716.74
8.0.30.0090.01217.27
8.0.20.0060.01317.04
8.0.10.0000.00716.86
8.0.00.0100.00716.76
7.4.330.0020.00215.55
7.4.320.0000.00616.65
7.4.300.0000.00616.49
7.4.290.0100.00016.48
7.4.280.0100.00316.38
7.4.270.0000.00716.54
7.4.260.0000.00816.50
7.4.250.0030.00316.61
7.4.240.0000.00816.55
7.4.230.0000.00716.38
7.4.220.0030.00516.35
7.4.210.0080.00816.59
7.4.200.0030.00316.25
7.4.160.0060.01016.39
7.4.140.0080.00817.86
7.4.130.0070.01416.46
7.4.120.0070.01016.39
7.4.110.0100.00616.43
7.4.100.0120.00416.54
7.4.90.0140.00316.50
7.4.80.0190.00519.39
7.4.70.0100.00616.54
7.4.60.0070.01016.65
7.4.50.0110.00316.38
7.4.40.0110.00816.48
7.4.00.0100.00315.23
7.3.330.0000.00513.32
7.3.320.0030.00313.30
7.3.310.0070.00016.34
7.3.300.0060.00016.34
7.3.290.0030.00316.35
7.3.280.0060.00816.23
7.3.260.0110.00716.43
7.3.240.0110.01116.42
7.3.230.0060.01016.55
7.3.210.0130.00416.36
7.3.200.0080.00816.29
7.3.190.0060.00916.43
7.3.180.0120.00316.44
7.3.170.0070.01016.42
7.3.160.0060.01216.51
7.3.50.0080.01214.70
7.3.40.0030.00614.54
7.3.30.0060.00614.79
7.3.20.0140.00016.51
7.3.10.0090.00616.84
7.3.00.0050.00516.64
7.2.330.0140.00416.66
7.2.320.0140.00916.49
7.2.310.0110.00516.54
7.2.300.0080.00816.52
7.2.290.0120.00916.42
7.2.180.0100.01014.98
7.2.170.0120.00614.65
7.2.160.0030.00914.89
7.2.150.0130.00917.00
7.2.140.0110.00716.75
7.2.130.0090.01216.76
7.2.120.0030.01016.76
7.2.110.0090.01216.71
7.2.100.0130.00816.87
7.2.90.0090.00916.86
7.2.80.0150.00016.68
7.2.70.0030.01616.94
7.2.60.0180.00316.95
7.2.50.0180.00316.88
7.2.40.0080.00616.98
7.2.30.0000.01416.73
7.2.20.0060.01216.79
7.2.10.0040.00816.68
7.2.00.0080.01516.72
7.1.280.0080.00415.91
7.1.270.0030.00715.71
7.1.260.0140.00515.50
7.1.250.0140.00315.87

preferences:
34.55 ms | 403 KiB | 5 Q