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(FATAL_ERROR, E_USER_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.0100.00718.68
8.3.50.0140.00522.83
8.3.40.0070.00718.59
8.3.30.0030.01019.09
8.3.20.0040.00420.34
8.3.10.0040.00423.70
8.3.00.0040.00419.50
8.2.180.0150.00016.50
8.2.170.0090.00622.96
8.2.160.0100.00320.43
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.15
8.2.110.0080.00022.01
8.2.100.0080.00419.39
8.2.90.0000.01019.30
8.2.80.0050.00517.97
8.2.70.0030.00617.75
8.2.60.0000.00717.80
8.2.50.0000.00818.07
8.2.40.0040.00419.97
8.2.30.0000.00718.11
8.2.20.0040.00417.86
8.2.10.0000.00718.12
8.2.00.0070.00017.80
8.1.280.0210.00025.92
8.1.270.0060.00323.80
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00623.79
8.1.230.0110.00019.01
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00717.35
8.1.180.0040.00418.10
8.1.170.0050.00318.65
8.1.160.0020.00522.09
8.1.150.0040.00418.93
8.1.140.0040.00417.45
8.1.130.0030.00317.86
8.1.120.0040.00417.37
8.1.110.0040.00417.32
8.1.100.0060.00317.44
8.1.90.0000.00817.35
8.1.80.0040.00417.41
8.1.70.0050.00217.34
8.1.60.0040.00417.64
8.1.50.0030.00517.54
8.1.40.0060.00317.55
8.1.30.0040.00417.57
8.1.20.0000.00817.67
8.1.10.0000.00717.67
8.1.00.0080.00017.49
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0070.00018.52
8.0.270.0000.00817.32
8.0.260.0030.00317.32
8.0.250.0040.00417.18
8.0.240.0040.00417.07
8.0.230.0030.00617.05
8.0.220.0070.00017.04
8.0.210.0000.00717.05
8.0.200.0030.00317.04
8.0.190.0030.00317.10
8.0.180.0000.00816.87
8.0.170.0040.00417.01
8.0.160.0000.00816.98
8.0.150.0100.00016.95
8.0.140.0040.00416.98
8.0.130.0000.00913.43
8.0.120.0030.00616.98
8.0.110.0000.00817.02
8.0.100.0060.00316.83
8.0.90.0040.00416.99
8.0.80.0080.01117.07
8.0.70.0000.00817.05
8.0.60.0080.00016.98
8.0.50.0000.00716.88
8.0.30.0110.00817.03
8.0.20.0080.01217.40
8.0.10.0060.00317.03
8.0.00.0120.00516.74
7.4.330.0050.00015.15
7.4.320.0030.00316.51
7.4.300.0030.00316.51
7.4.290.0070.00016.58
7.4.280.0000.00716.50
7.4.270.0030.00316.50
7.4.260.0070.00016.39
7.4.250.0030.00516.54
7.4.240.0040.00316.57
7.4.230.0030.00316.57
7.4.220.0070.02016.48
7.4.210.0080.00816.45
7.4.200.0030.00516.30
7.4.160.0040.01316.69
7.4.150.0060.01217.40
7.4.140.0060.01317.86
7.4.130.0170.00016.58
7.4.120.0070.01016.60
7.4.110.0100.01316.49
7.4.100.0090.00916.45
7.4.90.0030.01416.58
7.4.80.0060.01519.39
7.4.70.0060.01816.65
7.4.60.0060.01016.40
7.4.50.0040.00416.48
7.4.40.0170.00016.63
7.4.30.0040.01216.50
7.4.00.0110.00614.85
7.3.330.0070.00013.36
7.3.320.0000.00613.21
7.3.310.0000.00816.40
7.3.300.0000.00716.35
7.3.290.0070.00716.32
7.3.280.0130.00516.32
7.3.270.0070.01017.40
7.3.260.0170.00016.68
7.3.240.0120.00916.57
7.3.230.0090.00916.39
7.3.210.0090.00916.61
7.3.200.0130.00319.39
7.3.190.0130.00916.46
7.3.180.0040.01416.33
7.3.170.0080.00816.32
7.3.160.0090.00616.65
7.3.120.0110.00615.04
7.3.110.0060.01014.91
7.3.100.0090.00615.09
7.3.90.0000.01614.65
7.3.80.0040.00915.02
7.3.70.0070.00714.90
7.3.60.0110.00614.66
7.3.50.0080.00514.84
7.3.40.0060.00614.69
7.3.30.0060.00314.70
7.3.20.0030.01016.70
7.3.10.0090.00716.80
7.3.00.0050.00916.59
7.2.330.0090.00916.74
7.2.320.0090.01716.79
7.2.310.0080.01516.57
7.2.300.0140.00316.66
7.2.290.0140.00916.84
7.2.250.0060.01315.16
7.2.240.0100.01015.15
7.2.230.0030.01215.20
7.2.220.0040.01414.96
7.2.210.0070.00714.87
7.2.200.0060.00615.05
7.2.190.0120.00314.85
7.2.180.0090.00615.18
7.2.170.0030.01014.90
7.2.130.0060.00916.96
7.2.120.0030.01016.63
7.2.110.0030.01317.06
7.2.100.0040.00716.80
7.2.90.0070.00716.98
7.2.80.0160.00016.75
7.2.70.0070.01117.13
7.2.60.0060.00916.82
7.2.50.0090.00017.25
7.2.40.0040.01116.87
7.2.30.0120.00317.03
7.2.20.0030.01316.99
7.2.10.0120.00017.10
7.2.00.0030.01118.04
7.1.330.0070.00715.69
7.1.320.0070.01015.70
7.1.310.0120.00315.94
7.1.300.0030.00915.79
7.1.290.0090.00615.78
7.1.280.0030.00716.02
7.1.270.0070.00715.83
7.1.260.0000.01116.02
7.1.250.0030.01215.80
7.1.200.0120.00915.82
7.1.100.0000.01318.25
7.1.70.0000.00816.82
7.1.60.0160.00919.40
7.1.50.0100.01316.91
7.1.00.0030.07722.36
7.0.200.0340.00414.71
7.0.140.0070.07022.04
7.0.60.0100.06719.86
7.0.50.0100.08017.95
7.0.40.0170.07720.09
7.0.30.0330.05720.23
7.0.20.0300.08720.03
7.0.10.0000.05320.16
7.0.00.0030.07320.12
5.6.280.0000.07721.15
5.6.210.0070.05320.51
5.6.200.0000.04318.15
5.6.190.0030.07020.64
5.6.180.0330.06320.33
5.6.170.0300.05020.44
5.6.160.0170.07020.57
5.6.150.0030.04018.28
5.6.140.0070.08018.18
5.6.130.0100.05318.14
5.6.120.0070.07720.98
5.6.110.0100.05721.02
5.6.100.0130.05320.97
5.6.90.0100.06720.97
5.6.80.0070.07020.41
5.5.350.0230.06720.46
5.5.340.0070.04018.08
5.5.330.0030.06320.44
5.5.320.0070.06720.27
5.5.310.0400.06020.34
5.5.300.0170.07018.08
5.5.290.0100.07318.07
5.5.280.0030.09020.73
5.5.270.0100.08320.79
5.5.260.0130.07720.77
5.5.250.0100.03320.61
5.5.240.0300.07020.12
5.4.450.5330.02319.27
5.4.440.3430.04019.56
5.4.430.3600.04319.45
5.4.420.3730.03719.38
5.4.410.4870.03319.33
5.4.400.3670.04318.95
5.4.390.0030.04318.99
5.4.380.0630.06019.22
5.4.370.3970.04319.20
5.4.360.4170.03319.23
5.4.350.5870.03319.23
5.4.340.3870.03019.11
5.4.320.3970.03719.07
5.4.310.0070.07319.04
5.4.300.3770.03719.26
5.4.290.3900.03719.04
5.4.280.4300.04719.13
5.4.270.3870.04019.13
5.4.260.3800.04018.97
5.4.250.3870.03319.19
5.4.240.3900.03318.93
5.4.230.3930.04019.25
5.4.220.3500.04019.05
5.4.210.3670.04319.12
5.4.200.3830.03719.05
5.4.190.3870.04019.12
5.4.180.4470.03718.98
5.4.170.3830.03719.21
5.4.160.3870.03719.13
5.4.150.3700.04019.20
5.4.140.3900.03016.50
5.4.130.3830.03016.53
5.4.120.3800.03716.35
5.4.110.3830.03716.25
5.4.100.3900.03316.55
5.4.90.3600.03016.51
5.4.80.3700.03716.50
5.4.70.4300.03716.24
5.4.60.3600.04016.61
5.4.50.3730.03716.43
5.4.40.3800.03316.53
5.4.30.3630.03316.45
5.4.20.3830.04016.58
5.4.10.4230.03016.49
5.4.00.3600.03315.88
5.3.290.1900.02714.55
5.3.280.3730.04014.62
5.3.270.3630.03714.66
5.3.260.3870.03314.63
5.3.250.3900.03314.65
5.3.240.3800.04014.63
5.3.230.3700.03714.66
5.3.220.3800.04014.60
5.3.210.4100.04714.57
5.3.200.3830.03014.59
5.3.190.3570.03714.57
5.3.180.3930.03314.55
5.3.170.3500.04014.59
5.3.160.3630.03314.45
5.3.150.3830.03714.65
5.3.140.3700.03314.60
5.3.130.3630.02714.60
5.3.120.3630.03314.43
5.3.110.4130.04014.55
5.3.100.3570.03714.07
5.3.90.3970.04014.01
5.3.80.5670.03713.91
5.3.70.3870.03714.16
5.3.60.3530.03713.95
5.3.50.3800.04013.98
5.3.40.3870.03714.10
5.3.30.4000.02713.90
5.3.20.3370.03013.86
5.3.10.3600.03313.80
5.3.00.3570.04013.80
5.2.170.3100.02311.14
5.2.160.3500.02311.22
5.2.150.3300.02711.14
5.2.140.3170.02711.18
5.2.130.2970.02711.25
5.2.120.2970.03011.10
5.2.110.3030.02711.15
5.2.100.3000.03011.07
5.2.90.2770.03011.25
5.2.80.2970.02710.98
5.2.70.3030.03011.10
5.2.60.2800.02710.96
5.2.50.2770.02311.17
5.2.40.2400.02711.15
5.2.30.2400.02711.12
5.2.20.2100.03010.95
5.2.10.2230.03010.91
5.2.00.2500.02310.68
5.1.60.2500.0209.96
5.1.50.2630.02710.07
5.1.40.2470.02310.00
5.1.30.2730.02710.39
5.1.20.2570.02710.50
5.1.10.2370.02710.02
5.1.00.2630.02310.06
5.0.50.1570.0208.68
5.0.40.1770.0208.68
5.0.30.1670.0308.68
5.0.20.1800.0208.68
5.0.10.1670.0178.14
5.0.00.1330.0308.30
4.4.90.1130.0108.68
4.4.80.1170.0138.68
4.4.70.1130.0138.68
4.4.60.1170.0178.68
4.4.50.1200.0138.68
4.4.40.1530.0278.68
4.4.30.1230.0178.68
4.4.20.0970.0178.68
4.4.10.1470.0208.68
4.4.00.1470.0278.68
4.3.110.1930.0208.68
4.3.100.1670.0108.68
4.3.90.1230.0135.94
4.3.80.1370.0305.94
4.3.70.1500.0175.94
4.3.60.0870.0105.94
4.3.50.1230.0135.94
4.3.40.1470.0275.94
4.3.30.0800.0205.94
4.3.20.0800.0205.94
4.3.10.0670.0235.94
4.3.00.0830.0235.94

preferences:
38.57 ms | 401 KiB | 5 Q