3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, "apples",2, "oranges",3, "plums"); // array_filter() $lambda = function( $item ) { if ( ctype_alpha($item) ) { return true; } }; $filtered = array_filter( $array, $lambda); var_dump($filtered); // using array_map() $callback = function($item) { return strtoupper($item); }; $nu = array_map( $callback, $array); var_dump($nu); // array_walk() $f = function(&$item,$key,$prefix) { $item = "$prefix: $item"; }; array_walk($array, $f, 'phun'); var_dump($array);

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.0140.00718.30
8.3.50.0160.00522.04
8.3.40.0070.00718.85
8.3.30.0080.00619.09
8.3.20.0030.00620.25
8.3.10.0080.00023.70
8.3.00.0060.00319.25
8.2.180.0040.01116.50
8.2.170.0130.00622.96
8.2.160.0100.00320.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00822.04
8.2.110.0090.00022.13
8.2.100.0030.00917.75
8.2.90.0070.00019.08
8.2.80.0080.00017.97
8.2.70.0080.00017.63
8.2.60.0040.00417.93
8.2.50.0030.00518.07
8.2.40.0050.00318.19
8.2.30.0060.00317.88
8.2.20.0030.00517.64
8.2.10.0000.00718.01
8.2.00.0050.00317.74
8.1.280.0110.00425.92
8.1.270.0040.00423.96
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00423.97
8.1.230.0080.00419.16
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.01117.25
8.1.190.0060.00317.09
8.1.180.0050.00218.10
8.1.170.0030.00520.42
8.1.160.0000.00722.00
8.1.150.0070.00018.93
8.1.140.0000.00717.36
8.1.130.0030.00317.74
8.1.120.0000.00817.51
8.1.110.0050.00317.37
8.1.100.0000.00817.37
8.1.90.0020.00517.44
8.1.80.0000.00717.47
8.1.70.0070.00017.44
8.1.60.0000.00817.57
8.1.50.0050.00317.52
8.1.40.0000.00817.42
8.1.30.0000.00917.67
8.1.20.0090.00017.69
8.1.10.0000.00817.47
8.1.00.0000.00717.43
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0030.00318.32
8.0.270.0030.00317.30
8.0.260.0000.00617.25
8.0.250.0000.00716.96
8.0.240.0040.00416.93
8.0.230.0000.00716.84
8.0.220.0020.00516.75
8.0.210.0030.00316.90
8.0.200.0040.00416.82
8.0.190.0000.00716.98
8.0.180.0060.00316.93
8.0.170.0000.00716.96
8.0.160.0040.00416.95
8.0.150.0030.00716.73
8.0.140.0000.00816.89
8.0.130.0000.00613.29
8.0.120.0000.00816.73
8.0.110.0030.00316.85
8.0.100.0000.00816.88
8.0.90.0040.00416.75
8.0.80.0130.00316.80
8.0.70.0040.00416.89
8.0.60.0000.00816.95
8.0.50.0000.00716.77
8.0.30.0140.00517.11
8.0.20.0110.01117.40
8.0.10.0000.00817.02
8.0.00.0040.01416.88
7.4.330.0000.00515.03
7.4.320.0040.00416.51
7.4.300.0000.00716.52
7.4.290.0070.00016.56
7.4.280.0030.00316.49
7.4.270.0000.00716.51
7.4.260.0030.00616.47
7.4.250.0080.00016.45
7.4.240.0030.00416.55
7.4.230.0000.00616.43
7.4.220.0200.00716.59
7.4.210.0070.01416.46
7.4.200.0020.00516.38
7.4.160.0000.01616.63
7.4.150.0140.00317.40
7.4.140.0130.00617.86
7.4.130.0100.00716.44
7.4.120.0110.00516.48
7.4.110.0070.01016.71
7.4.100.0100.00716.42
7.4.90.0090.00916.62
7.4.80.0110.00619.39
7.4.70.0140.00716.39
7.4.60.0130.00316.31
7.4.50.0050.00016.28
7.4.40.0160.00316.47
7.4.30.0170.00016.36
7.4.00.0030.01315.06
7.3.330.0000.00513.23
7.3.320.0050.00013.39
7.3.310.0030.00316.34
7.3.300.0000.00716.41
7.3.290.0060.01116.35
7.3.280.0030.01116.32
7.3.270.0110.00717.40
7.3.260.0180.00016.28
7.3.250.0060.01416.51
7.3.240.0090.00916.38
7.3.230.0100.01316.39
7.3.210.0110.01116.45
7.3.200.0050.01619.39
7.3.190.0110.01116.51
7.3.180.0100.00716.47
7.3.170.0080.00816.65
7.3.160.0080.01416.44
7.2.330.0060.01516.80
7.2.320.0060.01116.63
7.2.310.0050.01416.75
7.2.300.0070.01016.62
7.2.290.0090.00916.60
7.2.60.0070.00717.01
7.2.00.0000.01419.49
7.1.200.0030.01315.59
7.1.100.0060.00618.10
7.1.70.0040.00417.11
7.1.60.0140.01019.32
7.1.50.0120.01216.96
7.1.00.0070.07322.57
7.0.200.0000.00716.64
7.0.140.0000.07322.15
7.0.60.0070.07319.91
7.0.50.0030.04717.88
7.0.40.0070.09020.23
7.0.30.0300.07720.11
7.0.20.0200.04320.10
7.0.10.0070.05020.25
7.0.00.0070.05020.22
5.6.280.0000.07720.86
5.6.210.0100.05320.63
5.6.200.0130.03718.19
5.6.190.0170.07320.39
5.6.180.0200.03720.58
5.6.170.0200.04320.52
5.6.160.0130.07020.43
5.6.150.0070.03718.21
5.6.140.0070.04718.18
5.6.130.0130.05018.18
5.6.120.0070.05720.99
5.6.110.0170.07720.98
5.6.100.0100.09021.04
5.6.90.0100.08320.89
5.6.80.0100.04720.38
5.6.70.3170.04020.29
5.5.350.0270.04020.39
5.5.340.0100.05318.09
5.5.330.0100.04320.26
5.5.320.0270.07720.20
5.5.310.0270.07020.32
5.5.300.0100.06018.08
5.5.290.0130.07718.04
5.5.280.0070.04320.98
5.5.270.0200.07720.77
5.5.260.0030.08320.85
5.5.250.0030.05020.62
5.5.240.0400.06020.16
5.4.450.0400.05719.49
5.4.440.0070.05719.39
5.4.430.0800.06019.18
5.4.420.0670.05319.47
5.4.410.0930.04719.18
5.4.400.0770.06319.14
5.4.390.0900.06318.87
5.4.380.0670.05019.37
5.4.370.0600.06318.86
5.4.360.0830.04019.13
5.4.350.0770.05719.23
5.4.340.0040.03712.02
5.4.320.0040.03812.51
5.4.310.0100.03412.50
5.4.300.0060.04312.51
5.4.290.0090.03912.50
5.4.280.0070.03712.40
5.4.270.0040.04112.41
5.4.260.0060.04112.40
5.4.250.0050.04312.40
5.4.240.0070.03712.40
5.4.230.0090.03812.40
5.4.220.0070.04612.39
5.4.210.0080.03612.39
5.4.200.0090.05112.39
5.4.190.0110.04512.39
5.4.180.0130.04912.39
5.4.170.0090.05612.39
5.4.160.0130.06212.39
5.4.150.0130.06712.39
5.4.140.0140.04712.08
5.4.130.0040.04512.07
5.4.120.0090.03612.02
5.4.110.0040.04112.02
5.4.100.0060.03712.02
5.4.90.0070.03912.02
5.4.80.0060.04112.02
5.4.70.0080.05212.01
5.4.60.0050.05112.01
5.4.50.0050.03712.01
5.4.40.0040.04212.00
5.4.30.0090.03612.00
5.4.20.0070.04312.00
5.4.10.0050.03812.00
5.4.00.0080.03811.48
5.3.290.0120.04012.80
5.3.280.0070.04012.71
5.3.270.0060.04112.72
5.3.260.0110.04812.72
5.3.250.0060.04212.72
5.3.240.0120.03612.72
5.3.230.0070.04012.71
5.3.220.0100.03712.68
5.3.210.0090.04112.68
5.3.200.0050.04112.68
5.3.190.0070.04512.68
5.3.180.0110.03812.67
5.3.170.0080.04012.67
5.3.160.0080.03912.68
5.3.150.0080.03712.68
5.3.140.0080.03612.66
5.3.130.0070.04012.66
5.3.120.0050.04212.66
5.3.110.0040.04812.66
5.3.100.0050.04212.12
5.3.90.0110.05012.11
5.3.80.0090.04712.10
5.3.70.0080.03712.10
5.3.60.0100.03412.08
5.3.50.0080.03512.03
5.3.40.0040.04112.03
5.3.30.0080.03311.99
5.3.20.0050.03811.77
5.3.10.0060.03411.73
5.3.00.0060.03611.72
5.2.170.0050.0319.18
5.2.160.0030.0309.18
5.2.150.0050.0309.18
5.2.140.0060.0299.18
5.2.130.0020.0319.14
5.2.120.0070.0269.14
5.2.110.0020.0339.14
5.2.100.0100.0259.14
5.2.90.0030.0419.14
5.2.80.0100.0259.14
5.2.70.0040.0349.14
5.2.60.0090.0299.09
5.2.50.0040.0309.06
5.2.40.0060.0289.04
5.2.30.0060.0279.01
5.2.20.0060.0279.00
5.2.10.0070.0268.93
5.2.00.0030.0308.79
5.1.60.0030.0258.07
5.1.50.0060.0338.07
5.1.40.0060.0238.05
5.1.30.0050.0268.40
5.1.20.0040.0278.41
5.1.10.0050.0258.14
5.1.00.0050.0258.15
5.0.50.0050.0196.63
5.0.40.0090.0146.48
5.0.30.0050.0306.29
5.0.20.0030.0206.26
5.0.10.0040.0196.24
5.0.00.0030.0316.23
4.4.90.0020.0164.78
4.4.80.0030.0154.75
4.4.70.0020.0164.75
4.4.60.0020.0164.75
4.4.50.0020.0164.77
4.4.40.0050.0224.71
4.4.30.0020.0164.76
4.4.20.0050.0154.84
4.4.10.0030.0184.85
4.4.00.0040.0244.76
4.3.110.0030.0164.67
4.3.100.0030.0164.66
4.3.90.0010.0164.63
4.3.80.0030.0244.58
4.3.70.0010.0164.63
4.3.60.0030.0154.63
4.3.50.0040.0144.63
4.3.40.0050.0224.54
4.3.30.0030.0153.28
4.3.20.0020.0163.26
4.3.10.0020.0153.22
4.3.00.0130.0307.26

preferences:
41.66 ms | 401 KiB | 5 Q