3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const AB♥ = "alphabet"; } $rc = new ReflectionClass("Test"); $const = array_keys( $rc->getConstants())[0]; // $substr = substr( $const, -1,1 ); $substr = mb_substr( $const, -1,1 ); // PHP 5.6 if ( $substr === "♥" ) { trigger_error("\"♥\" in \"$key\"" ); } // Notice: "♥" in "AB ♥" …

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.0070.00718.43
8.3.50.0180.00522.94
8.3.40.0070.00718.88
8.3.30.0070.00719.27
8.3.20.0070.00020.29
8.3.10.0080.00023.57
8.3.00.0050.00317.63
8.2.180.0140.00016.88
8.2.170.0120.00622.96
8.2.160.0130.00020.39
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00221.02
8.2.110.0090.00022.21
8.2.100.0040.00717.91
8.2.90.0070.00319.34
8.2.80.0060.00317.97
8.2.70.0000.00917.63
8.2.60.0060.00318.04
8.2.50.0000.00818.07
8.2.40.0030.00520.07
8.2.30.0050.00318.19
8.2.20.0050.00317.87
8.2.10.0040.00418.05
8.2.00.0000.00717.68
8.1.280.0040.01125.92
8.1.270.0080.00023.97
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00023.92
8.1.230.0050.00519.01
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.01017.13
8.1.190.0040.00417.10
8.1.180.0050.00318.10
8.1.170.0060.00318.65
8.1.160.0070.00321.95
8.1.150.0040.00418.77
8.1.140.0030.00517.32
8.1.130.0030.00317.86
8.1.120.0020.00517.41
8.1.110.0030.00517.27
8.1.100.0040.00417.39
8.1.90.0000.00717.34
8.1.80.0000.00717.41
8.1.70.0070.00017.41
8.1.60.0050.00317.58
8.1.50.0050.00317.45
8.1.40.0040.00417.39
8.1.30.0040.00417.64
8.1.20.0040.00417.67
8.1.10.0040.00417.52
8.1.00.0040.00417.40
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0040.00418.54
8.0.270.0000.00717.24
8.0.260.0030.00317.26
8.0.250.0030.00316.98
8.0.240.0030.00317.15
8.0.230.0030.00316.93
8.0.220.0030.00316.90
8.0.210.0000.00716.91
8.0.200.0030.00316.96
8.0.190.0000.00717.07
8.0.180.0040.00417.00
8.0.170.0000.00817.05
8.0.160.0000.00717.01
8.0.150.0060.00316.93
8.0.140.0000.00716.96
8.0.130.0060.00013.48
8.0.120.0040.00416.88
8.0.110.0040.00416.87
8.0.100.0050.00217.08
8.0.90.0040.00317.01
8.0.80.0120.00916.96
8.0.70.0070.00016.90
8.0.60.0000.00716.82
8.0.50.0040.00416.90
8.0.30.0080.01317.07
8.0.20.0090.01017.40
8.0.10.0050.00516.87
8.0.00.0100.00816.79
7.4.330.0020.00215.09
7.4.320.0000.00616.53
7.4.300.0030.00316.36
7.4.290.0040.00416.59
7.4.280.0030.00516.61
7.4.270.0070.00016.65
7.4.260.0000.00716.61
7.4.250.0040.00416.40
7.4.240.0020.00516.47
7.4.230.0000.00716.32
7.4.220.0100.00716.62
7.4.210.0070.01416.47
7.4.200.0040.00416.30
7.4.160.0100.00716.74
7.4.150.0090.01317.40
7.4.140.0070.01017.86
7.4.130.0110.00616.51
7.4.120.0080.01116.56
7.4.110.0130.01916.63
7.4.100.0030.01316.59
7.4.90.0120.00616.46
7.4.80.0060.00919.39
7.4.70.0100.00716.48
7.4.60.0100.00716.54
7.4.50.0000.00816.61
7.4.40.0070.01016.57
7.4.30.0040.01116.79
7.4.00.0040.00814.80
7.3.330.0000.00713.29
7.3.320.0060.00013.16
7.3.310.0070.00016.35
7.3.300.0030.00316.34
7.3.290.0100.00316.23
7.3.280.0100.00616.28
7.3.270.0120.00617.40
7.3.260.0040.01416.32
7.3.250.0040.01316.57
7.3.240.0130.00316.55
7.3.230.0070.01016.39
7.3.210.0170.00716.50
7.3.200.0090.00619.39
7.3.190.0150.00616.67
7.3.180.0120.00316.61
7.3.170.0100.01316.44
7.3.160.0090.00616.30
7.2.330.0120.00616.73
7.2.320.0030.01316.66
7.2.310.0170.00016.78
7.2.300.0080.00816.81
7.2.290.0090.00616.73
7.2.60.0130.01016.98
7.2.50.0090.00316.84
7.2.00.0030.01019.22
7.1.200.0090.00615.86
7.1.100.0060.00618.14
7.1.70.0000.00716.86
7.1.60.0120.01219.40
7.1.50.0030.01716.61
7.1.00.0000.08022.37
7.0.200.0210.00314.56
7.0.140.0070.06322.08
7.0.60.0130.07319.95
7.0.50.0130.07317.84
7.0.40.0070.07320.30
7.0.30.0300.07720.06
7.0.20.0270.07320.17
7.0.10.0270.04320.26
7.0.00.0030.04320.37
5.6.280.0000.07720.93
5.6.210.0070.08020.53
5.6.200.0100.05318.16
5.6.190.0070.04320.46
5.6.180.4170.04020.47
5.6.170.0300.06720.48
5.6.160.0100.06020.54
5.6.150.0070.06318.12
5.6.140.0030.04318.23
5.6.130.0030.05318.20
5.6.120.0100.06721.03
5.6.110.0000.04320.98
5.6.100.0130.06321.01
5.6.90.0130.07321.08
5.6.80.0100.06020.50
5.6.70.0300.05020.50
5.5.350.0370.07320.39
5.5.340.0070.08317.96
5.5.330.0030.09020.41
5.5.320.0370.03320.51
5.5.310.0270.03720.30
5.5.300.0000.04018.02
5.5.290.0130.03718.10
5.5.280.0070.07720.73
5.5.270.0070.04720.84
5.5.260.0000.09020.96
5.5.250.0100.05020.77
5.5.240.0300.07020.18
5.4.450.0270.07319.56
5.4.440.0130.05719.55
5.4.430.0270.04319.39
5.4.420.0230.05719.55
5.4.410.0100.05719.02
5.4.400.0300.05018.87
5.4.390.0330.04718.56
5.4.380.0030.05718.62
5.4.370.0030.05018.82
5.4.360.0070.04718.63
5.4.350.0070.03312.02
5.4.340.0060.03712.02
5.4.320.0070.04012.50
5.4.310.0040.05012.49
5.4.300.0070.04012.50
5.4.290.0130.03712.49
5.4.280.0080.04012.39
5.4.270.0070.03612.39
5.4.260.0090.04212.39
5.4.250.0110.04312.39
5.4.240.0090.03912.39
5.4.230.0070.04212.38
5.4.220.0060.04012.38
5.4.210.0120.03612.38
5.4.200.0080.04412.38
5.4.190.0070.03712.38
5.4.180.0040.03812.38
5.4.170.0040.04112.39
5.4.160.0060.03712.39
5.4.150.0070.04112.39
5.4.140.0040.03812.07
5.4.130.0060.03512.05
5.4.120.0090.03612.02
5.4.110.0040.03812.01
5.4.100.0060.03512.01
5.4.90.0040.03912.01
5.4.80.0050.03812.01
5.4.70.0060.03412.00
5.4.60.0040.03612.00
5.4.50.0030.03812.00
5.4.40.0060.03411.99
5.4.30.0070.04111.99
5.4.20.0060.03511.99
5.4.10.0060.03411.99
5.4.00.0050.03711.47
5.3.290.0050.04112.80
5.3.280.0080.03612.71
5.3.270.0050.03912.72
5.3.260.0070.03712.72
5.3.250.0040.03812.72
5.3.240.0050.03812.72
5.3.230.0060.03812.71
5.3.220.0060.03712.68
5.3.210.0100.03412.68
5.3.200.0070.03512.68
5.3.190.0070.03712.68
5.3.180.0040.03812.68
5.3.170.0120.04112.67
5.3.160.0040.04012.67
5.3.150.0040.04012.67
5.3.140.0060.03712.66
5.3.130.0070.03812.65
5.3.120.0050.03912.65
5.3.110.0050.04012.66
5.3.100.0060.03612.12
5.3.90.0050.04312.10
5.3.80.0070.03612.09
5.3.70.0090.04412.09
5.3.60.0070.04612.07
5.3.50.0050.04412.02
5.3.40.0110.04112.03
5.3.30.0050.03411.98
5.3.20.0050.03511.76
5.3.10.0060.03611.73
5.3.00.0060.03511.71
5.2.170.0050.0299.22
5.2.160.0030.0349.22
5.2.150.0070.0289.22
5.2.140.0050.0349.21
5.2.130.0030.0339.18
5.2.120.0030.0309.18
5.2.110.0050.0309.18
5.2.100.0050.0339.18
5.2.90.0040.0359.17
5.2.80.0050.0319.17
5.2.70.0040.0319.17
5.2.60.0040.0319.13
5.2.50.0060.0309.10
5.2.40.0040.0309.07
5.2.30.0020.0329.04
5.2.20.0060.0279.04
5.2.10.0060.0278.94
5.2.00.0010.0318.80
5.1.60.0050.0248.09
5.1.50.0030.0328.09
5.1.40.0060.0228.07
5.1.30.0060.0248.41
5.1.20.0040.0268.43
5.1.10.0040.0288.16
5.1.00.0030.0278.16
5.0.50.0040.0206.64
5.0.40.0040.0186.50
5.0.30.0060.0346.32
5.0.20.0050.0196.28
5.0.10.0020.0216.26
5.0.00.0020.0376.25
4.4.90.0030.0154.78
4.4.80.0020.0154.75
4.4.70.0020.0164.76
4.4.60.0030.0234.75
4.4.50.0030.0194.77
4.4.40.0040.0234.71
4.4.30.0010.0184.76
4.4.20.0020.0164.84
4.4.10.0030.0154.85
4.4.00.0010.0294.76
4.3.110.0060.0144.67
4.3.100.0040.0134.67
4.3.90.0020.0154.64
4.3.80.0010.0264.58
4.3.70.0040.0134.63
4.3.60.0040.0154.63
4.3.50.0010.0194.62
4.3.40.0010.0264.54
4.3.30.0010.0173.30
4.3.20.0030.0153.28
4.3.10.0010.0163.23
4.3.00.0070.0177.28

preferences:
41.24 ms | 401 KiB | 5 Q