3v4l.org

run code in 300+ PHP versions simultaneously
<?php function filterLabel($label) { $filtered = trim($label); $array = array($filtered => 1); $filtered = key($array); if ($filtered === false) { throw new UnexpectedValueException('Unable to filter %s', var_export($label, true)); } return $filtered; } $data = array("foo", "0foo", 0, 1, NULL, FALSE, new SimpleXMLElement('<root />')); foreach ($data as $index => $label) { printf("==== %d ====\n", $index); var_dump($label, filterLabel($label)); }

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.0090.00918.68
8.3.50.0130.00823.12
8.3.40.0110.00718.96
8.3.30.0110.00719.34
8.3.20.0080.00020.41
8.3.10.0030.00523.78
8.3.00.0060.00319.38
8.2.180.0120.00318.54
8.2.170.0150.00622.96
8.2.160.0150.00020.48
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00426.16
8.2.120.0050.00321.27
8.2.110.0070.00320.64
8.2.100.0050.00520.20
8.2.90.0040.00419.47
8.2.80.0040.00418.00
8.2.70.0060.00317.88
8.2.60.0000.00818.18
8.2.50.0050.00518.07
8.2.40.0000.00818.47
8.2.30.0080.00018.36
8.2.20.0040.00417.98
8.2.10.0000.00718.20
8.2.00.0050.00318.11
8.1.280.0140.00725.92
8.1.270.0090.00023.96
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0070.01023.95
8.1.230.0080.00319.13
8.1.220.0040.00418.03
8.1.210.0050.00318.77
8.1.200.0030.00717.48
8.1.190.0070.00317.38
8.1.180.0040.00418.10
8.1.170.0030.00618.71
8.1.160.0030.00622.10
8.1.150.0070.00019.04
8.1.140.0040.00417.62
8.1.130.0000.00817.97
8.1.120.0000.00717.57
8.1.110.0000.00817.55
8.1.100.0040.00417.59
8.1.90.0040.00417.55
8.1.80.0040.00417.64
8.1.70.0000.00717.56
8.1.60.0030.00617.69
8.1.50.0030.00517.79
8.1.40.0000.00817.71
8.1.30.0040.00417.79
8.1.20.0000.00817.92
8.1.10.0040.00417.70
8.1.00.0060.00317.69
8.0.300.0000.00718.77
8.0.290.0000.00716.88
8.0.280.0030.00318.58
8.0.270.0070.00017.58
8.0.260.0030.00317.43
8.0.250.0040.00417.23
8.0.240.0000.00717.16
8.0.230.0030.00317.20
8.0.220.0030.00317.13
8.0.210.0030.00316.93
8.0.200.0030.00317.20
8.0.190.0040.00417.19
8.0.180.0040.00417.06
8.0.170.0000.00817.11
8.0.160.0080.00017.14
8.0.150.0000.00717.04
8.0.140.0000.00717.01
8.0.130.0030.00313.50
8.0.120.0030.00617.02
8.0.110.0030.00617.08
8.0.100.0050.00316.93
8.0.90.0040.00416.95
8.0.80.0100.00717.14
8.0.70.0040.00416.94
8.0.60.0050.00317.05
8.0.50.0040.00417.14
8.0.30.0080.01217.19
8.0.20.0110.00817.40
8.0.10.0000.00717.22
8.0.00.0120.00716.96
7.4.330.0030.00315.00
7.4.320.0030.00316.58
7.4.300.0000.00616.80
7.4.290.0030.00316.82
7.4.280.0000.00816.72
7.4.270.0000.00716.72
7.4.260.0000.00716.69
7.4.250.0000.00716.59
7.4.240.0030.00516.72
7.4.230.0070.00016.85
7.4.220.0110.00816.78
7.4.210.0130.00616.67
7.4.200.0070.00016.89
7.4.160.0080.00816.86
7.4.150.0110.01417.40
7.4.140.0130.00517.86
7.4.130.0130.00516.70
7.4.120.0090.00816.64
7.4.110.0170.00716.70
7.4.100.0160.00316.73
7.4.90.0110.00616.80
7.4.80.0140.00319.39
7.4.70.0060.01216.73
7.4.60.0120.00616.70
7.4.50.0060.00316.63
7.4.40.0070.01116.80
7.4.30.0080.00816.64
7.4.00.0070.01115.26
7.3.330.0000.00613.42
7.3.320.0030.00313.54
7.3.310.0000.00816.62
7.3.300.0000.00716.52
7.3.290.0040.01116.51
7.3.280.0060.00916.55
7.3.270.0120.00617.40
7.3.260.0110.00516.59
7.3.250.0080.00816.67
7.3.240.0060.01316.68
7.3.230.0090.00916.76
7.3.210.0060.01516.48
7.3.200.0070.01119.39
7.3.190.0030.01416.82
7.3.180.0060.00916.50
7.3.170.0130.00216.72
7.3.160.0080.00816.66
7.3.120.0090.00915.10
7.3.110.0070.01014.81
7.3.100.0060.00915.05
7.3.90.0030.00614.84
7.3.80.0040.01115.09
7.3.70.0100.00314.84
7.3.60.0090.00615.03
7.3.50.0000.01314.82
7.3.40.0070.01114.93
7.3.30.0040.00715.01
7.3.20.0110.00716.80
7.3.10.0120.00416.99
7.3.00.0060.01016.93
7.2.330.0090.00917.05
7.2.320.0110.00616.96
7.2.310.0170.00716.94
7.2.300.0100.00716.98
7.2.290.0090.00917.02
7.2.250.0060.01215.06
7.2.240.0030.01315.02
7.2.230.0060.01215.09
7.2.220.0030.00715.32
7.2.210.0030.01314.79
7.2.200.0070.00715.26
7.2.190.0090.00015.15
7.2.180.0070.01015.19
7.2.170.0000.01615.25
7.2.60.0120.00317.00
7.2.00.0150.00419.37
7.1.330.0000.01415.91
7.1.320.0170.00016.06
7.1.310.0040.01215.99
7.1.300.0040.00815.98
7.1.290.0030.01415.95
7.1.280.0040.00715.98
7.1.270.0100.00615.94
7.1.260.0030.01515.67
7.1.200.0000.01415.81
7.1.100.0030.01318.27
7.1.70.0030.00717.25
7.1.60.0160.01019.46
7.1.50.0030.00716.88
7.1.00.0130.06322.40
7.0.200.0000.01017.04
7.0.140.0070.07022.03
7.0.60.0030.04720.00
7.0.50.0030.04717.94
7.0.40.0130.06720.47
7.0.30.0330.07020.27
7.0.20.0200.08320.20
7.0.10.0030.05320.29
7.0.00.0100.08720.18
5.6.210.0100.07720.57
5.6.200.0070.04018.26
5.6.190.0070.09020.77
5.6.180.0300.07720.77
5.6.170.0200.04020.57
5.6.160.0030.07720.54
5.6.150.0070.05718.38
5.6.140.0070.03718.31
5.6.130.0070.08018.34
5.6.120.0070.05021.04
5.6.110.0030.08721.01
5.6.100.0070.08321.09
5.6.90.0000.09021.11
5.6.80.0070.07720.62
5.6.70.4270.03720.42
5.5.350.0070.03320.37
5.5.340.0070.03718.05
5.5.330.0100.06720.60
5.5.320.0100.08320.49
5.5.310.0300.07320.48
5.5.300.0000.04318.14
5.5.290.0100.06318.02
5.5.280.0100.06320.78
5.5.270.0200.07020.98
5.5.260.0100.04021.00
5.5.250.0070.09020.54
5.5.240.0230.08020.17
5.4.450.0300.04019.41
5.4.440.0330.04019.46
5.4.430.0470.03719.65
5.4.420.0200.03719.38
5.4.410.0930.03719.48
5.4.400.0530.03319.03
5.4.390.0170.03719.15
5.4.380.0570.05718.52
5.4.370.0300.06018.84
5.4.360.0470.06018.54
5.4.350.0470.04318.82
5.4.340.0500.05318.80
5.4.320.0030.03812.61
5.4.310.0040.03912.61
5.4.300.0080.03412.61
5.4.290.0060.03712.61
5.4.280.0090.04012.50
5.4.270.0050.04212.50
5.4.260.0070.04812.50
5.4.250.0090.04412.50
5.4.240.0070.04412.50
5.4.230.0110.04112.50
5.4.220.0100.04212.49
5.4.210.0060.03712.50
5.4.200.0070.04012.50
5.4.190.0060.03712.49
5.4.180.0080.03612.50
5.4.170.0080.03912.51
5.4.160.0050.04212.50
5.4.150.0080.03812.50
5.4.140.0040.04012.18
5.4.130.0070.03612.17
5.4.120.0020.03912.13
5.4.110.0030.03712.12
5.4.100.0040.03712.13
5.4.90.0070.03512.13
5.4.80.0040.03812.13
5.4.70.0050.03412.12
5.4.60.0030.03712.12
5.4.50.0070.03712.11
5.4.40.0080.03212.10
5.4.30.0090.03112.10
5.4.20.0060.03512.10
5.4.10.0060.03712.10
5.4.00.0050.03611.59
5.3.290.0070.03712.87
5.3.280.0070.03612.80
5.3.270.0080.03712.81
5.3.260.0070.03812.82
5.3.250.0060.03812.81
5.3.240.0050.03912.81
5.3.230.0090.04012.80
5.3.220.0060.03812.77
5.3.210.0070.03812.78
5.3.200.0060.03712.77
5.3.190.0070.03612.77
5.3.180.0060.03712.77
5.3.170.0070.03612.77
5.3.160.0060.03812.77
5.3.150.0040.04112.77
5.3.140.0070.03812.76
5.3.130.0080.03912.75
5.3.120.0100.03612.76
5.3.110.0060.04012.75
5.3.100.0040.04012.25
5.3.90.0060.03712.22
5.3.80.0110.03212.21
5.3.70.0080.03812.21
5.3.60.0080.03612.20
5.3.50.0100.03212.14
5.3.40.0080.03912.14
5.3.30.0070.03912.11
5.3.20.0060.03511.90
5.3.10.0080.03411.86
5.3.00.0090.03511.83
5.2.170.0050.0319.34
5.2.160.0050.0299.34
5.2.150.0090.0279.33
5.2.140.0070.0299.34
5.2.130.0040.0309.30
5.2.120.0060.0289.29
5.2.110.0060.0289.30
5.2.100.0100.0249.30
5.2.90.0050.0299.30
5.2.80.0060.0299.29
5.2.70.0050.0299.30
5.2.60.0080.0359.25
5.2.50.0030.0399.21
5.2.40.0030.0319.19
5.2.30.0010.0339.17
5.2.20.0040.0299.16
5.2.10.0070.0269.06
5.2.00.0040.0348.93
5.1.60.0020.0268.21
5.1.50.0060.0258.21
5.1.40.0040.0248.19
5.1.30.0050.0268.54
5.1.20.0040.0278.56
5.1.10.0040.0268.28
5.1.00.0060.0278.28
5.0.50.0010.0236.76
5.0.40.0050.0186.62
5.0.30.0030.0326.44
5.0.20.0030.0196.41
5.0.10.0060.0176.38
5.0.00.0060.0286.37
4.4.90.0020.0164.78
4.4.80.0010.0184.75
4.4.70.0010.0184.75
4.4.60.0020.0164.75
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0020.0164.76
4.4.20.0020.0164.84
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0010.0174.67
4.3.100.0060.0154.66
4.3.90.0050.0134.64
4.3.80.0050.0224.58
4.3.70.0020.0184.63
4.3.60.0030.0164.63
4.3.50.0030.0164.63
4.3.40.0040.0234.54
4.3.30.0020.0183.30
4.3.20.0030.0153.28
4.3.10.0020.0163.25
4.3.00.0070.01718.23

preferences:
52.93 ms | 401 KiB | 5 Q