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, $filtered); var_dump($nu); // array_walk() echo array_walk($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.0100.01018.68
8.3.50.0080.01421.96
8.3.40.0140.00018.82
8.3.30.0070.01119.07
8.3.20.0030.00620.16
8.3.10.0030.00523.61
8.3.00.0030.00619.51
8.2.180.0090.00618.54
8.2.170.0000.01422.96
8.2.160.0030.01020.39
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00322.09
8.2.110.0000.01119.34
8.2.100.0060.00617.75
8.2.90.0060.00319.22
8.2.80.0060.00317.97
8.2.70.0030.00617.50
8.2.60.0000.00718.04
8.2.50.0080.00018.07
8.2.40.0050.00319.82
8.2.30.0000.00818.08
8.2.20.0040.00417.79
8.2.10.0000.00818.11
8.2.00.0070.00017.76
8.1.280.0210.00025.92
8.1.270.0090.00024.01
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00322.19
8.1.230.0040.00720.95
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0100.00017.38
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0040.00420.24
8.1.160.0000.00722.07
8.1.150.0070.00018.91
8.1.140.0000.00917.53
8.1.130.0000.00717.89
8.1.120.0040.00417.37
8.1.110.0000.00817.38
8.1.100.0040.00317.38
8.1.90.0050.00217.50
8.1.80.0000.00717.45
8.1.70.0070.00017.36
8.1.60.0060.00317.58
8.1.50.0000.00817.52
8.1.40.0040.00417.41
8.1.30.0000.00817.55
8.1.20.0040.00417.57
8.1.10.0090.00017.63
8.1.00.0040.00417.41
8.0.300.0080.00018.77
8.0.290.0000.00716.75
8.0.280.0030.00318.38
8.0.270.0040.00417.26
8.0.260.0000.00617.10
8.0.250.0000.00816.85
8.0.240.0020.00516.97
8.0.230.0070.00016.91
8.0.220.0000.00816.78
8.0.210.0030.00316.77
8.0.200.0040.00417.02
8.0.190.0040.00417.04
8.0.180.0040.00417.01
8.0.170.0050.00316.89
8.0.160.0030.00316.92
8.0.150.0040.00416.80
8.0.140.0000.00716.90
8.0.130.0000.00613.37
8.0.120.0080.00016.80
8.0.110.0050.00317.00
8.0.100.0040.00417.02
8.0.90.0000.00716.84
8.0.80.0040.01216.93
8.0.70.0030.00516.91
8.0.60.0000.00716.79
8.0.50.0040.00416.95
8.0.30.0060.01416.96
8.0.20.0100.00817.40
8.0.10.0040.00416.88
8.0.00.0090.00916.69
7.4.330.0000.00515.20
7.4.320.0000.00616.55
7.4.300.0030.00316.61
7.4.290.0000.00716.61
7.4.280.0040.00416.44
7.4.270.0030.00316.56
7.4.260.0030.00316.60
7.4.250.0040.00416.57
7.4.240.0000.00716.51
7.4.230.0000.00716.39
7.4.220.0210.00316.54
7.4.210.0030.01216.54
7.4.200.0030.00316.68
7.4.160.0120.00416.58
7.4.150.0060.01417.40
7.4.140.0140.00417.86
7.4.130.0080.01316.54
7.4.120.0060.01116.54
7.4.110.0070.01016.71
7.4.100.0100.01016.51
7.4.90.0110.00616.63
7.4.80.0130.00319.39
7.4.70.0090.01216.51
7.4.60.0130.00416.64
7.4.50.0000.00516.42
7.4.40.0090.00916.52
7.4.30.0140.00316.40
7.4.00.0070.00814.87
7.3.330.0050.00013.12
7.3.320.0000.00613.32
7.3.310.0040.00416.26
7.3.300.0040.00416.31
7.3.290.0070.01016.28
7.3.280.0120.00616.26
7.3.270.0070.01817.40
7.3.260.0180.00616.33
7.3.250.0090.01016.29
7.3.240.0140.00416.23
7.3.230.0060.01316.43
7.3.210.0120.00616.66
7.3.200.0040.01219.39
7.3.190.0040.01516.41
7.3.180.0130.00316.18
7.3.170.0120.00416.32
7.3.160.0040.01516.42
7.3.120.0070.01114.77
7.3.110.0000.01814.71
7.3.100.0030.01014.56
7.3.90.0040.01514.68
7.3.80.0070.00714.98
7.3.70.0040.01114.65
7.3.60.0120.00314.85
7.3.50.0120.00314.50
7.3.40.0090.00614.90
7.3.30.0120.00314.40
7.3.20.0050.00516.70
7.3.10.0090.00616.80
7.3.00.0060.00316.80
7.2.330.0080.01516.37
7.2.320.0110.00716.53
7.2.310.0060.01616.76
7.2.300.0160.00016.64
7.2.290.0070.01616.62
7.2.250.0070.00714.82
7.2.240.0090.00915.24
7.2.230.0070.01015.17
7.2.220.0060.01314.95
7.2.210.0070.01014.90
7.2.200.0030.00615.15
7.2.190.0070.00715.11
7.2.180.0040.01114.99
7.2.170.0150.00315.05
7.2.00.0050.00519.59
7.1.330.0100.00315.79
7.1.320.0120.00315.62
7.1.310.0120.00315.65
7.1.300.0030.00715.83
7.1.290.0080.00815.68
7.1.280.0070.00715.84
7.1.270.0000.01015.73
7.1.260.0110.00415.76
7.1.100.0070.00318.27
7.1.70.0000.00916.98
7.1.60.0110.01419.32
7.1.50.0130.01016.84
7.1.00.0100.07022.35
7.0.200.0000.00916.57
7.0.140.0030.07321.95
7.0.60.0030.06720.01
7.0.50.0030.06317.96
7.0.40.0070.04720.09
7.0.30.0470.07320.07
7.0.20.0130.09020.34
7.0.10.0000.08320.05
7.0.00.0070.08320.33
5.6.280.0100.06720.87
5.6.210.0000.04720.54
5.6.200.0100.08018.22
5.6.190.0130.07020.48
5.6.180.0170.04020.44
5.6.170.0230.07320.47
5.6.160.0070.04020.50
5.6.150.0100.03318.19
5.6.140.0100.03718.26
5.6.130.0070.07318.18
5.6.120.0030.09021.03
5.6.110.0100.08321.02
5.6.100.0100.08020.89
5.6.90.0070.03721.07
5.6.80.0200.06720.34
5.6.70.3300.03320.38
5.5.350.0270.03720.30
5.5.340.0000.04317.99
5.5.330.0070.04320.26
5.5.320.0370.07720.27
5.5.310.0300.06320.31
5.5.300.0130.04717.95
5.5.290.0200.07317.98
5.5.280.0170.07320.88
5.5.270.0030.04320.73
5.5.260.0030.07320.76
5.5.250.0070.04020.69
5.5.240.0230.04320.16
5.4.450.0870.05319.20
5.4.440.0670.05019.47
5.4.430.0030.06319.56
5.4.420.0770.07319.38
5.4.410.0670.05319.46
5.4.400.0570.06719.38
5.4.390.0630.06018.84
5.4.380.0770.05718.84
5.4.370.0830.04318.84
5.4.360.0430.04719.05
5.4.350.0870.04719.14
5.4.340.0080.03412.02
5.4.320.0060.03712.51
5.4.310.0090.03912.50
5.4.300.0060.04012.51
5.4.290.0070.03612.50
5.4.280.0040.03612.40
5.4.270.0040.04012.40
5.4.260.0090.03612.40
5.4.250.0040.04412.40
5.4.240.0080.03512.41
5.4.230.0080.03612.39
5.4.220.0090.03312.40
5.4.210.0050.03612.39
5.4.200.0060.03712.39
5.4.190.0070.03512.39
5.4.180.0050.03712.39
5.4.170.0040.03812.39
5.4.160.0050.03712.40
5.4.150.0060.03712.39
5.4.140.0060.04312.07
5.4.130.0040.03812.06
5.4.120.0050.03612.02
5.4.110.0040.03712.02
5.4.100.0070.03712.02
5.4.90.0050.03912.01
5.4.80.0080.03912.01
5.4.70.0050.03412.01
5.4.60.0080.03212.01
5.4.50.0060.03512.01
5.4.40.0040.03612.00
5.4.30.0100.03712.00
5.4.20.0080.03312.00
5.4.10.0060.04511.99
5.4.00.0060.03711.48
5.3.290.0090.04812.80
5.3.280.0060.04512.71
5.3.270.0080.04712.73
5.3.260.0060.04412.72
5.3.250.0150.05012.72
5.3.240.0110.04912.72
5.3.230.0070.03812.71
5.3.220.0090.05212.68
5.3.210.0070.04112.68
5.3.200.0070.03712.68
5.3.190.0060.04412.68
5.3.180.0060.03712.68
5.3.170.0070.03612.67
5.3.160.0040.03812.67
5.3.150.0060.03712.67
5.3.140.0080.03712.66
5.3.130.0030.04112.66
5.3.120.0050.03912.66
5.3.110.0060.03912.66
5.3.100.0060.03812.12
5.3.90.0080.03512.10
5.3.80.0040.03812.09
5.3.70.0030.04012.09
5.3.60.0100.03912.08
5.3.50.0110.03212.03
5.3.40.0050.03812.03
5.3.30.0070.03311.98
5.3.20.0090.03211.77
5.3.10.0020.03811.73
5.3.00.0060.03511.72
5.2.170.0040.0309.18
5.2.160.0070.0339.18
5.2.150.0070.0419.18
5.2.140.0080.0399.18
5.2.130.0070.0399.14
5.2.120.0050.0289.14
5.2.110.0090.0269.14
5.2.100.0040.0299.14
5.2.90.0030.0309.14
5.2.80.0030.0329.14
5.2.70.0020.0329.14
5.2.60.0030.0319.09
5.2.50.0060.0299.06
5.2.40.0020.0319.04
5.2.30.0060.0289.01
5.2.20.0080.0269.00
5.2.10.0070.0258.92
5.2.00.0040.0308.78
5.1.60.0060.0228.07
5.1.50.0040.0258.07
5.1.40.0040.0288.05
5.1.30.0060.0328.40
5.1.20.0020.0308.42
5.1.10.0060.0288.14
5.1.00.0040.0298.14
5.0.50.0040.0226.62
5.0.40.0040.0196.48
5.0.30.0050.0306.29
5.0.20.0030.0206.27
5.0.10.0040.0196.24
5.0.00.0060.0296.23
4.4.90.0020.0214.78
4.4.80.0050.0134.75
4.4.70.0020.0164.75
4.4.60.0010.0174.75
4.4.50.0040.0144.77
4.4.40.0020.0264.71
4.4.30.0010.0184.76
4.4.20.0000.0184.85
4.4.10.0040.0164.85
4.4.00.0030.0274.76
4.3.110.0020.0174.67
4.3.100.0060.0124.67
4.3.90.0000.0184.63
4.3.80.0010.0314.58
4.3.70.0060.0184.63
4.3.60.0060.0144.62
4.3.50.0070.0184.62
4.3.40.0010.0274.54
4.3.30.0030.0193.28
4.3.20.0010.0173.26
4.3.10.0010.0163.22
4.3.00.0070.0237.26

preferences:
45.53 ms | 401 KiB | 5 Q