3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $j=500000; while($i < 60000) { $i++; $j++; $data1[] = md5($i); $data2[] = md5($j); } $time = microtime(true); echo "Starting array_filter\n"; $x = 0; $test = array_filter($data1, function($str) use (&$x) { return ++$x % 2 != 0; }); $test = array_filter($data2, function($str) use (&$x) { return ++$x % 2 != 0; }); unset($test); $time = microtime(true) - $time; echo 'array_filter() took ' . number_format($time, 3) . " seconds\n";

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)
7.4.10.0200.07329.20
7.4.00.0170.07929.17
7.3.130.0100.06429.00
7.3.120.0190.05529.20
7.3.110.0100.06329.39
7.3.100.0070.05229.30
7.3.90.0100.05029.37
7.3.80.0100.05929.11
7.3.70.0070.05329.02
7.3.60.0070.05229.03
7.3.50.0100.05229.15
7.3.40.0030.06129.20
7.3.30.0100.05029.23
7.3.20.0220.03230.46
7.3.10.0030.05430.55
7.3.00.0140.04430.29
7.2.260.0130.09129.05
7.2.250.0160.09229.27
7.2.240.0140.05229.27
7.2.230.0100.05229.10
7.2.220.0070.05929.04
7.2.210.0230.04629.36
7.2.200.0100.06728.90
7.2.190.0160.05229.29
7.2.180.0130.06629.12
7.2.170.0170.04729.28
7.2.160.0070.08529.01
7.2.150.0000.07530.71
7.2.140.0030.05930.74
7.2.130.0000.05930.51
7.2.120.0160.08230.83
7.2.110.0130.07130.88
7.2.100.0130.05230.75
7.2.90.0100.09031.00
7.2.80.0100.07130.63
7.2.70.0100.04830.59
7.2.60.0070.05530.53
7.2.50.0070.06230.90
7.2.40.0130.07630.79
7.2.30.0100.05230.98
7.2.20.0070.08130.79
7.2.10.0070.05630.81
7.2.00.0080.06831.96
7.1.330.0140.06129.62
7.1.320.0030.07829.85
7.1.310.0070.06729.95
7.1.300.0100.06729.78
7.1.290.0030.07229.93
7.1.280.0030.07629.86
7.1.270.0030.07429.45
7.1.260.0030.07029.51
7.1.250.0030.07129.95
7.1.240.0100.07629.59
7.1.230.0100.06829.65
7.1.220.0100.06229.86
7.1.210.0170.07029.88
7.1.200.0160.08529.74
7.1.190.0130.06429.52
7.1.180.0070.10229.60
7.1.170.0130.09329.77
7.1.160.0130.06929.91
7.1.150.0070.06529.75
7.1.140.0030.07429.76
7.1.130.0100.08729.75
7.1.120.0070.06729.90
7.1.110.0070.09129.65
7.1.100.0070.07029.49
7.1.90.0030.10329.69
7.1.80.0100.06629.70
7.1.70.0080.05930.56
7.1.60.0100.06230.50
7.1.50.0100.08430.36
7.1.40.0030.07329.90
7.1.30.0000.09929.76
7.1.20.0000.10329.50
7.1.10.0000.07829.70
7.1.00.0100.10132.99
7.0.330.0070.09929.56
7.0.320.0070.07329.42
7.0.310.0130.07829.39
7.0.300.0130.09929.47
7.0.290.0130.08029.20
7.0.280.0030.08629.46
7.0.270.0070.07029.37
7.0.260.0000.08229.38
7.0.250.0100.09529.67
7.0.240.0000.07629.62
7.0.230.0030.07529.57
7.0.220.0030.08529.34
7.0.210.0030.08929.60
7.0.200.4930.07629.80
7.0.190.0030.08329.36
7.0.180.0000.07429.50
7.0.170.0100.07629.32
7.0.160.0030.06829.52
7.0.150.0030.08229.25
7.0.140.0050.10532.71
7.0.130.0070.07429.55
7.0.120.0100.09929.50
7.0.110.0070.07229.24
7.0.100.0100.07129.55
7.0.90.0030.09429.11
7.0.80.0030.08329.39
7.0.70.0070.09029.45
7.0.60.0020.10631.73
7.0.50.0070.08330.64
7.0.40.0130.11720.33
7.0.30.0220.08720.51
7.0.20.0250.11620.28
7.0.10.0080.09120.53
7.0.00.0080.09620.41
5.6.400.0170.15643.16
5.6.390.0230.16443.66
5.6.380.0200.13443.20
5.6.370.0100.14043.37
5.6.360.0330.15043.80
5.6.350.0200.14943.12
5.6.340.0170.15143.56
5.6.330.0160.15743.34
5.6.320.0200.12943.36
5.6.310.0300.16543.41
5.6.300.0230.13843.66
5.6.290.0200.16343.13
5.6.280.0250.16646.56
5.6.270.0270.17043.33
5.6.260.0230.15143.21
5.6.250.0200.12843.70
5.6.240.0070.14643.38
5.6.230.0260.12443.42
5.6.220.0200.15343.19
5.6.210.0100.18246.57
5.6.200.0030.19045.36
5.6.190.0200.14146.55
5.6.180.1830.13646.29
5.6.170.0330.15646.42
5.6.160.0120.14646.34
5.6.150.0130.15145.23
5.6.140.0220.15045.28
5.6.130.0220.17445.30
5.6.120.0170.15046.82
5.6.110.0230.17146.83
5.6.100.0200.16246.81
5.6.90.0130.16246.65
5.6.80.0130.13146.33
5.6.70.0330.16846.43
5.6.60.0200.17443.14
5.6.50.0200.13043.59
5.6.40.0170.13743.18
5.6.30.0230.13943.18
5.6.20.0200.14643.48
5.6.10.0200.16443.53
5.6.00.0300.12543.39
5.5.380.0130.15043.39
5.5.370.0070.14443.36
5.5.360.0130.14143.25
5.5.350.0280.13646.41
5.5.340.0150.16045.10
5.5.330.0130.17446.20
5.5.320.0270.16246.41
5.5.310.0170.13346.21
5.5.300.0230.16845.06
5.5.290.0200.12745.13
5.5.280.0180.14046.40
5.5.270.0120.12846.54
5.5.260.0080.14546.34
5.5.250.0200.15146.58
5.5.240.0280.15046.39
5.5.230.0200.16043.30
5.5.220.0060.15243.27
5.5.210.0170.15743.47
5.5.200.0200.12243.37
5.5.190.0290.12743.38
5.5.180.0270.17243.12
5.5.170.0170.14743.38
5.5.160.0200.16843.38
5.5.150.0200.18043.06
5.5.140.0260.16443.29
5.5.130.0100.15943.11
5.5.120.0100.13043.27
5.5.110.0170.13743.45
5.5.100.0200.13443.23
5.5.90.0100.17343.25
5.5.80.0230.18042.99
5.5.70.0300.14043.39
5.5.60.0270.14243.13
5.5.50.0100.15843.44
5.5.40.0030.16943.00
5.5.30.0030.16643.50
5.5.20.0230.12543.34
5.5.10.0130.16243.35
5.5.00.0200.13843.06
5.4.450.0530.17844.26
5.4.440.0300.18044.23
5.4.430.0200.17844.10
5.4.420.0430.16344.35
5.4.410.0370.18144.06
5.4.400.0330.19844.01
5.4.390.0350.16443.99
5.4.380.0370.19043.77
5.4.370.0510.17943.74
5.4.360.0430.20943.76
5.4.350.0450.20743.87
5.4.340.0350.17343.88
5.4.330.0030.17440.24
5.4.320.0180.13640.80
5.4.310.0200.15740.66
5.4.300.0150.14740.70
5.4.290.0120.14840.64
5.4.280.0180.14540.72
5.4.270.0180.13840.62
5.4.260.0130.13840.75
5.4.250.0160.16040.65
5.4.240.0120.15540.64
5.4.230.0100.14940.57
5.4.220.0240.15140.62
5.4.210.0100.14040.84
5.4.200.0150.15440.79
5.4.190.0230.14040.70
5.4.180.0190.14540.64
5.4.170.0110.15140.70
5.4.160.0150.16140.69
5.4.150.0130.14340.54
5.4.140.0150.14640.68
5.4.130.0190.16440.36
5.4.120.0160.16340.63
5.4.110.0150.14640.57
5.4.100.0150.13940.45
5.4.90.0200.14640.57
5.4.80.0220.15140.48
5.4.70.0170.13640.54
5.4.60.0180.15140.52
5.4.50.0100.14840.56
5.4.40.0180.12840.46
5.4.30.0170.13140.41
5.4.20.0200.13940.54
5.4.10.0190.15240.42
5.4.00.0180.14640.18
5.3.290.0210.16141.20
5.3.280.0200.15041.14
5.3.270.0150.17441.14
5.3.260.0180.16941.14
5.3.250.0190.16441.14
5.3.240.0180.18641.14
5.3.230.0200.18341.14
5.3.220.0200.18641.11
5.3.210.0270.18341.11
5.3.200.0230.15541.10
5.3.190.0240.15541.11
5.3.180.0220.15141.10
5.3.170.0240.16941.11
5.3.160.0170.15641.10
5.3.150.0270.16941.10
5.3.140.0190.15941.10
5.3.130.0260.14941.08
5.3.120.0510.17241.09
5.3.110.0180.14341.09
5.3.100.0120.15540.57
5.3.90.0140.15140.56
5.3.80.0120.15440.55
5.3.70.0160.16040.55
5.3.60.0170.15940.53
5.3.50.0220.15440.48
5.3.40.0170.17140.48
5.3.30.0140.15640.44
5.3.20.0140.14740.22
5.3.10.0140.15640.18
5.3.00.0160.15240.17
5.2.170.0050.0339.19
5.2.160.0070.0349.19
5.2.150.0050.0309.19
5.2.140.0030.0339.18
5.2.130.0040.0389.14
5.2.120.0070.0259.14
5.2.110.0050.0299.15
5.2.100.0070.0269.14
5.2.90.0090.0259.14
5.2.80.0050.0319.14
5.2.70.0060.0309.14
5.2.60.0040.0319.10
5.2.50.0060.0299.07
5.2.40.0040.0299.04
5.2.30.0080.0359.02
5.2.20.0060.0289.00
5.2.10.0060.0278.92
5.2.00.0060.0288.79
5.1.60.0060.0228.07
5.1.50.0040.0268.07
5.1.40.0030.0268.05
5.1.30.0030.0268.40
5.1.20.0020.0288.42
5.1.10.0030.0308.14
5.1.00.0040.0258.15
5.0.50.0040.0256.63
5.0.40.0050.0206.48
5.0.30.0030.0396.29
5.0.20.0050.0236.27
5.0.10.0030.0206.24
5.0.00.0040.0306.23
4.4.90.0030.0194.78
4.4.80.0030.0174.75
4.4.70.0030.0174.75
4.4.60.0030.0174.75
4.4.50.0050.0154.77
4.4.40.0040.0254.71
4.4.30.0020.0194.76
4.4.20.0030.0224.85
4.4.10.0060.0174.85
4.4.00.0030.0264.76
4.3.110.0040.0144.67
4.3.100.0010.0164.67
4.3.90.0040.0134.64
4.3.80.0030.0244.58
4.3.70.0020.0154.63
4.3.60.0070.0134.63
4.3.50.0110.0134.63
4.3.40.0200.0254.54
4.3.30.0070.0173.28
4.3.20.0120.0173.26
4.3.10.0070.0203.23
4.3.00.0130.0206.98

preferences:
37.78 ms | 401 KiB | 5 Q