3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const AB♥ = "alphabet"; } $rc = new ReflectionClass("Test"); $t = array_keys( $rc->getConstants())[0]; $substr = substr( $t, -1,1 ); // $substr = mb_substr( $t, -1,1 ); // PHP 5.6 if ( $substr === "♥" ) { trigger_error("\"♥\" in \"$t\"",E_USER_ERROR ); } // [ PHP5.4 - 5.6 ] // Fatal error: "♥" 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.0040.01418.41
8.3.50.0130.00522.82
8.3.40.0140.00718.63
8.3.30.0030.01019.02
8.3.20.0040.00420.30
8.3.10.0040.00423.53
8.3.00.0090.00019.26
8.2.180.0120.00316.38
8.2.170.0130.00322.96
8.2.160.0030.01020.52
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0100.00026.16
8.2.120.0050.00321.07
8.2.110.0060.00321.09
8.2.100.0080.00317.78
8.2.90.0050.00317.91
8.2.80.0090.00019.28
8.2.70.0000.00817.93
8.2.60.0000.00717.80
8.2.50.0030.00518.10
8.2.40.0040.00420.55
8.2.30.0030.00517.96
8.2.20.0070.00017.57
8.2.10.0070.00018.06
8.2.00.0040.00417.73
8.1.280.0080.00525.92
8.1.270.0110.00423.85
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0030.00722.74
8.1.230.0060.00622.67
8.1.220.0030.00617.74
8.1.210.0030.00618.77
8.1.200.0120.00017.23
8.1.190.0060.00317.10
8.1.180.0030.00518.10
8.1.170.0060.00318.59
8.1.160.0040.00422.21
8.1.150.0050.00318.78
8.1.140.0050.00317.43
8.1.130.0000.00717.73
8.1.120.0080.00017.41
8.1.110.0040.00417.37
8.1.100.0110.00017.36
8.1.90.0000.00717.28
8.1.80.0030.00417.29
8.1.70.0050.00217.32
8.1.60.0040.00417.52
8.1.50.0040.00417.35
8.1.40.0040.00417.46
8.1.30.0000.00817.48
8.1.20.0000.00817.63
8.1.10.0040.00417.45
8.1.00.0000.00717.48
8.0.300.0070.00022.01
8.0.290.0000.00916.75
8.0.280.0040.00418.42
8.0.270.0040.00417.10
8.0.260.0000.00717.14
8.0.250.0000.00716.93
8.0.240.0000.00816.90
8.0.230.0000.00616.73
8.0.220.0000.00616.81
8.0.210.0040.00416.81
8.0.200.0000.00616.88
8.0.190.0030.00316.90
8.0.180.0040.00416.67
8.0.170.0060.00316.75
8.0.160.0000.00716.87
8.0.150.0080.00016.75
8.0.140.0080.00016.67
8.0.130.0030.00313.29
8.0.120.0040.00416.77
8.0.110.0040.00416.89
8.0.100.0070.00016.65
8.0.90.0040.00416.69
8.0.80.0130.00316.78
8.0.70.0040.00416.60
8.0.60.0040.00416.81
8.0.50.0040.00416.69
8.0.30.0100.01017.11
8.0.20.0100.00917.40
8.0.10.0050.00516.97
8.0.00.0120.00716.70
7.4.330.0020.00215.16
7.4.320.0000.00716.50
7.4.300.0030.00316.52
7.4.290.0000.00716.44
7.4.280.0070.00016.58
7.4.270.0040.00416.49
7.4.260.0000.00816.53
7.4.250.0000.00716.44
7.4.240.0020.00516.51
7.4.230.0000.00716.33
7.4.220.0110.01116.57
7.4.210.0070.00716.55
7.4.200.0000.00716.54
7.4.160.0070.01016.42
7.4.150.0170.00017.40
7.4.140.0110.00817.86
7.4.130.0100.01016.46
7.4.120.0090.00816.42
7.4.110.0060.01016.59
7.4.100.0060.01216.54
7.4.90.0150.00316.52
7.4.80.0080.00819.39
7.4.70.0060.01116.41
7.4.60.0110.00616.47
7.4.50.0050.00316.64
7.4.40.0030.01316.46
7.4.30.0060.00916.40
7.4.00.0060.01014.93
7.3.330.0050.00213.07
7.3.320.0050.00012.95
7.3.310.0000.00816.21
7.3.300.0030.00316.20
7.3.290.0110.00316.17
7.3.280.0090.00816.18
7.3.270.0040.01317.40
7.3.260.0210.01416.35
7.3.240.0110.00616.36
7.3.230.0040.01316.39
7.3.210.0070.01416.41
7.3.200.0040.01419.39
7.3.190.0120.00316.55
7.3.180.0090.00616.52
7.3.170.0090.00616.45
7.3.160.0060.00916.30
7.2.330.0090.00916.30
7.2.320.0030.01316.52
7.2.310.0030.01416.45
7.2.300.0310.02416.63
7.2.290.0090.00616.51
7.2.00.0060.01019.40
7.1.100.0060.00318.29
7.1.70.0040.00816.87
7.1.60.0150.01119.40
7.1.50.0100.01316.60
7.1.00.0030.07022.50
7.0.200.0170.00014.89
7.0.140.0030.06722.07
7.0.60.0000.07720.04
7.0.50.0070.04717.84
7.0.40.0070.04320.43
7.0.30.0170.08320.24
7.0.20.0270.05320.30
7.0.10.0170.07720.24
7.0.00.0070.04020.23
5.6.280.0070.07020.76
5.6.210.0130.07720.46
5.6.200.0030.04318.18
5.6.190.0030.05320.77
5.6.180.0300.06720.64
5.6.170.0130.06720.50
5.6.160.0130.07720.43
5.6.150.0070.06718.18
5.6.140.0070.03318.27
5.6.130.0100.03318.28
5.6.120.0100.07321.14
5.6.110.0030.07321.11
5.6.100.0070.08721.04
5.6.90.0070.08721.12
5.6.80.0000.08020.38
5.5.350.0300.07320.40
5.5.340.0100.05018.08
5.5.330.0030.05320.35
5.5.320.0170.04720.20
5.5.310.0230.07320.34
5.5.300.0070.08317.90
5.5.290.0100.04018.06
5.5.280.0030.04020.68
5.5.270.0100.07720.95
5.5.260.0130.07720.64
5.5.250.0070.08320.77
5.5.240.0130.06720.36
5.4.450.0830.05319.56
5.4.440.0670.05319.47
5.4.430.0570.05719.16
5.4.420.0570.05019.56
5.4.410.0200.04318.75
5.4.400.0300.05018.87
5.4.390.0270.06318.65
5.4.380.0130.05318.82
5.4.370.0070.04318.72
5.4.360.0170.03318.70
5.4.350.0050.03512.02
5.4.340.0080.04612.01
5.4.320.0050.04612.50
5.4.310.0040.03812.50
5.4.300.0040.04212.50
5.4.290.0060.03712.50
5.4.280.0050.03412.39
5.4.270.0100.04712.39
5.4.260.0080.03612.39
5.4.250.0030.04012.39
5.4.240.0050.04712.39
5.4.230.0060.03712.38
5.4.220.0070.03412.38
5.4.210.0060.03512.38
5.4.200.0030.04112.39
5.4.190.0050.03612.38
5.4.180.0050.04012.38
5.4.170.0080.03912.39
5.4.160.0050.03612.39
5.4.150.0090.04012.38
5.4.140.0040.04412.07
5.4.130.0060.03412.05
5.4.120.0080.03812.01
5.4.110.0060.03512.01
5.4.100.0050.03612.01
5.4.90.0080.03512.01
5.4.80.0050.03712.01
5.4.70.0060.03512.00
5.4.60.0080.04212.00
5.4.50.0090.03412.01
5.4.40.0060.03511.99
5.4.30.0050.03611.99
5.4.20.0040.03911.99
5.4.10.0050.03911.99
5.4.00.0070.03911.48
5.3.290.0050.04012.80
5.3.280.0080.03512.71
5.3.270.0060.03812.72
5.3.260.0050.03912.72
5.3.250.0070.03512.72
5.3.240.0070.03612.71
5.3.230.0060.03612.71
5.3.220.0030.03812.68
5.3.210.0040.03912.68
5.3.200.0050.03712.68
5.3.190.0070.03712.68
5.3.180.0040.04912.67
5.3.170.0070.03612.67
5.3.160.0030.03912.68
5.3.150.0080.03812.67
5.3.140.0100.04412.66
5.3.130.0070.04812.66
5.3.120.0090.04412.66
5.3.110.0050.04712.65
5.3.100.0070.05212.12
5.3.90.0080.03412.10
5.3.80.0090.03312.09
5.3.70.0050.03712.09
5.3.60.0030.03712.07
5.3.50.0060.03412.02
5.3.40.0070.04212.02
5.3.30.0060.03611.98
5.3.20.0100.03711.76
5.3.10.0080.03711.73
5.3.00.0040.03711.71
5.2.170.0050.0299.22
5.2.160.0090.0309.22
5.2.150.0100.0379.22
5.2.140.0040.0429.22
5.2.130.0050.0329.18
5.2.120.0030.0369.18
5.2.110.0050.0299.18
5.2.100.0050.0279.18
5.2.90.0020.0349.17
5.2.80.0060.0419.17
5.2.70.0050.0369.17
5.2.60.0040.0319.13
5.2.50.0070.0279.09
5.2.40.0040.0299.07
5.2.30.0040.0309.05
5.2.20.0060.0329.04
5.2.10.0050.0298.94
5.2.00.0040.0308.80
5.1.60.0010.0278.09
5.1.50.0040.0278.09
5.1.40.0020.0278.07
5.1.30.0090.0308.42
5.1.20.0050.0318.44
5.1.10.0040.0358.16
5.1.00.0040.0248.16
5.0.50.0030.0206.64
5.0.40.0020.0216.50
5.0.30.0040.0306.32
5.0.20.0020.0206.28
5.0.10.0070.0216.25
5.0.00.0070.0276.25
4.4.90.0040.0174.78
4.4.80.0020.0164.75
4.4.70.0050.0244.75
4.4.60.0040.0184.76
4.4.50.0050.0144.77
4.4.40.0050.0264.71
4.4.30.0020.0194.76
4.4.20.0020.0154.84
4.4.10.0020.0214.85
4.4.00.0050.0264.76
4.3.110.0020.0164.67
4.3.100.0070.0174.67
4.3.90.0040.0144.63
4.3.80.0010.0274.58
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0000.0194.63
4.3.40.0020.0264.54
4.3.30.0010.0233.30
4.3.20.0010.0203.28
4.3.10.0020.0163.24
4.3.00.0130.0237.16

preferences:
40.95 ms | 401 KiB | 5 Q