3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const AB♥ = "alphabet"; } $rc = new ReflectionClass("Test"); $bad = "♥"; $key = array_keys( $rc->getConstants() ); $target = $key[ 0 ]; //php5.6: if ( mb_substr( $target, -1,1) == $bad ) { $pos = strpos( $target, $bad ); var_dump( $pos,mb_substr( $target, $pos,1 )); if ($pos !== FALSE) { trigger_error( "'$bad_char' in '$target'" ); }

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.0110.00416.88
8.3.50.0130.00722.83
8.3.40.0140.00418.97
8.3.30.0110.00419.14
8.3.20.0040.00420.34
8.3.10.0080.00023.67
8.3.00.0030.00519.50
8.2.180.0140.00018.42
8.2.170.0090.00622.96
8.2.160.0110.00420.53
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.01026.16
8.2.120.0040.00420.73
8.2.110.0060.00320.88
8.2.100.0070.00417.97
8.2.90.0030.00617.88
8.2.80.0040.00417.97
8.2.70.0000.00918.03
8.2.60.0080.00017.80
8.2.50.0000.00818.07
8.2.40.0000.00819.94
8.2.30.0070.00018.13
8.2.20.0070.00017.88
8.2.10.0000.00718.00
8.2.00.0040.00417.80
8.1.280.0030.01225.92
8.1.270.0040.00423.84
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0050.00519.17
8.1.230.0040.00822.74
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00616.88
8.1.190.0080.00017.10
8.1.180.0050.00318.10
8.1.170.0040.00718.59
8.1.160.0040.00421.92
8.1.150.0040.00418.77
8.1.140.0080.00017.41
8.1.130.0070.00017.84
8.1.120.0040.00417.40
8.1.110.0000.00717.25
8.1.100.0000.00717.37
8.1.90.0070.00017.37
8.1.80.0000.00817.43
8.1.70.0000.00817.31
8.1.60.0040.00417.48
8.1.50.0040.00417.45
8.1.40.0060.00317.47
8.1.30.0050.00517.67
8.1.20.0070.00017.67
8.1.10.0040.00417.59
8.1.00.0000.00717.60
8.0.300.0050.00518.77
8.0.290.0070.00016.88
8.0.280.0030.00318.52
8.0.270.0030.00317.21
8.0.260.0000.00617.34
8.0.250.0030.00317.08
8.0.240.0000.00717.01
8.0.230.0000.00716.93
8.0.220.0030.00316.86
8.0.210.0030.00316.89
8.0.200.0000.00717.05
8.0.190.0040.00417.18
8.0.180.0000.00717.04
8.0.170.0000.00816.99
8.0.160.0040.00416.89
8.0.150.0030.00717.02
8.0.140.0040.00416.88
8.0.130.0000.00713.50
8.0.120.0040.00416.97
8.0.110.0050.00217.04
8.0.100.0040.00417.03
8.0.90.0050.00216.91
8.0.80.0070.01017.01
8.0.70.0040.00416.84
8.0.60.0070.00016.84
8.0.50.0050.00316.90
8.0.30.0110.01116.96
8.0.20.0090.01017.40
8.0.10.0090.00017.04
8.0.00.0070.01016.65
7.4.330.0050.00015.16
7.4.320.0000.00616.51
7.4.300.0070.00016.42
7.4.290.0070.00016.63
7.4.280.0000.00816.60
7.4.270.0030.00316.50
7.4.260.0000.00716.59
7.4.250.0050.00316.35
7.4.240.0030.00316.56
7.4.230.0030.00316.51
7.4.220.0130.00616.63
7.4.210.0060.01316.65
7.4.200.0070.00016.71
7.4.160.0070.01016.51
7.4.150.0110.00717.40
7.4.140.0030.01417.86
7.4.130.0100.00816.48
7.4.120.0080.01116.49
7.4.110.0170.00316.66
7.4.100.0090.00916.52
7.4.90.0120.01116.58
7.4.80.0090.00919.39
7.4.70.0110.00616.60
7.4.60.0000.01616.48
7.4.50.0000.00716.49
7.4.40.0140.00316.58
7.4.30.0060.01016.52
7.4.00.0090.00815.12
7.3.330.0000.00813.17
7.3.320.0040.00413.31
7.3.310.0070.00016.41
7.3.300.0030.00316.32
7.3.290.0090.00616.39
7.3.280.0070.00916.35
7.3.270.0120.00417.40
7.3.260.0120.00616.76
7.3.250.0110.00616.53
7.3.240.0060.01416.28
7.3.230.0130.00316.65
7.3.210.0080.00816.48
7.3.200.0060.01219.39
7.3.190.0040.01216.64
7.3.180.0060.01016.34
7.3.170.0090.00616.45
7.3.160.0060.01016.59
7.3.120.0070.00714.79
7.3.110.0030.01315.12
7.3.100.0050.00514.89
7.3.90.0070.00714.95
7.3.80.0030.00715.08
7.3.70.0060.00614.76
7.3.60.0070.00714.89
7.3.50.0060.00614.76
7.3.40.0030.01314.86
7.3.30.0070.00714.80
7.3.20.0000.01216.81
7.3.10.0030.01316.65
7.3.00.0040.01116.80
7.2.330.0100.01016.73
7.2.320.0080.00816.39
7.2.310.0180.00416.82
7.2.300.0070.01016.84
7.2.290.0040.01216.68
7.2.250.0070.01115.03
7.2.240.0110.00614.96
7.2.230.0040.01414.90
7.2.220.0060.01115.04
7.2.210.0080.00814.86
7.2.200.0040.01215.18
7.2.190.0040.01114.79
7.2.180.0120.00315.00
7.2.170.0070.00715.23
7.2.60.0120.00316.78
7.2.50.0100.01016.63
7.1.330.0030.01015.76
7.1.320.0000.01415.75
7.1.310.0000.01715.75
7.1.300.0090.00315.85
7.1.290.0090.00315.80
7.1.280.0000.01515.84
7.1.270.0030.01315.77
7.1.260.0000.01115.73
7.1.200.0060.00615.73
7.1.70.0100.00616.95
7.1.60.0140.01019.40
7.1.50.0070.01416.59
7.1.00.0070.07322.48
7.0.200.0200.01014.63
7.0.140.0100.06722.06
7.0.60.0130.08319.91
7.0.50.0100.03317.86
7.0.40.0100.08020.04
7.0.30.0300.07320.13
7.0.20.0270.07720.09
7.0.10.0030.07020.20
7.0.00.0100.08720.23
5.6.280.0130.06321.02
5.6.210.0030.09020.61
5.6.200.0100.06718.15
5.6.190.0030.04720.77
5.6.180.0170.04720.55
5.6.170.0330.07720.54
5.6.160.0030.09020.55
5.6.150.0100.07718.17
5.6.140.0130.08018.21
5.6.130.0030.05318.28
5.6.120.0070.05321.12
5.6.110.0100.08321.01
5.6.100.0130.08321.00
5.6.90.0100.03721.10
5.6.80.0100.05320.41
5.5.350.0270.07320.43
5.5.340.0030.08017.92
5.5.330.0130.03720.27
5.5.320.0300.07720.24
5.5.310.0370.08020.27
5.5.300.0000.04717.95
5.5.290.0170.07018.02
5.5.280.0030.06020.73
5.5.270.0030.06320.86
5.5.260.0100.07720.79
5.5.250.0170.07020.66
5.5.240.0000.08320.23
5.4.450.0970.05719.45
5.4.440.0570.06019.65
5.4.430.0770.05319.54
5.4.420.0700.05719.55
5.4.410.0100.05318.94
5.4.400.0400.05718.87
5.4.390.0370.05718.49
5.4.380.0170.05018.74
5.4.370.0130.03718.75
5.4.360.0100.03318.83
5.4.350.0060.03312.02
5.4.340.0060.03512.02
5.4.320.0080.03312.50
5.4.310.0060.04412.49
5.4.300.0040.04712.49
5.4.290.0060.03912.50
5.4.280.0050.04112.39
5.4.270.0060.03512.39
5.4.260.0070.03912.39
5.4.250.0060.04312.39
5.4.240.0080.03712.39
5.4.230.0080.03512.38
5.4.220.0050.03612.38
5.4.210.0050.03612.38
5.4.200.0040.03812.38
5.4.190.0070.03512.38
5.4.180.0090.03212.38
5.4.170.0030.03812.39
5.4.160.0040.03712.39
5.4.150.0040.03612.38
5.4.140.0050.03612.07
5.4.130.0040.03612.06
5.4.120.0060.03812.01
5.4.110.0070.03412.01
5.4.100.0060.03512.01
5.4.90.0040.03812.01
5.4.80.0070.03512.01
5.4.70.0080.03212.01
5.4.60.0050.03512.00
5.4.50.0040.03612.00
5.4.40.0060.03312.00
5.4.30.0050.03611.99
5.4.20.0060.04511.99
5.4.10.0060.03411.99
5.4.00.0050.03711.48
5.3.290.0100.03612.80
5.3.280.0070.04212.71
5.3.270.0080.03912.72
5.3.260.0080.04012.72
5.3.250.0050.03812.72
5.3.240.0070.03612.72
5.3.230.0050.03812.71
5.3.220.0050.03712.68
5.3.210.0100.03812.68
5.3.200.0050.03912.68
5.3.190.0040.03912.68
5.3.180.0040.03812.67
5.3.170.0100.03712.67
5.3.160.0040.03812.68
5.3.150.0050.03812.67
5.3.140.0090.03512.66
5.3.130.0070.03712.66
5.3.120.0050.04412.66
5.3.110.0090.03912.66
5.3.100.0060.03712.11
5.3.90.0070.04012.09
5.3.80.0090.05112.09
5.3.70.0130.04812.08
5.3.60.0220.06412.07
5.3.50.0160.06312.02
5.3.40.0290.09812.02
5.3.30.0260.10311.97
5.3.20.0170.08411.76
5.3.10.0090.04811.72
5.3.00.0110.05811.71
5.2.170.0070.0429.21
5.2.160.0080.0379.21
5.2.150.0080.0409.21
5.2.140.0070.0429.21
5.2.130.0090.0439.17
5.2.120.0080.0379.17
5.2.110.0080.0379.18
5.2.100.0040.0439.18
5.2.90.0080.0379.17
5.2.80.0090.0399.17
5.2.70.0050.0419.16
5.2.60.0070.0359.12
5.2.50.0060.0319.09
5.2.40.0010.0349.06
5.2.30.0090.0269.04
5.2.20.0040.0319.03
5.2.10.0060.0278.93
5.2.00.0050.0318.80
5.1.60.0060.0278.08
5.1.50.0090.0338.08
5.1.40.0060.0358.06
5.1.30.0050.0258.41
5.1.20.0020.0308.43
5.1.10.0040.0328.16
5.1.00.0060.0258.16
5.0.50.0050.0206.63
5.0.40.0030.0236.50
5.0.30.0050.0316.31
5.0.20.0030.0216.27
5.0.10.0030.0226.25
5.0.00.0050.0326.24
4.4.90.0040.0174.78
4.4.80.0080.0134.75
4.4.70.0050.0224.75
4.4.60.0030.0174.75
4.4.50.0040.0164.77
4.4.40.0030.0254.71
4.4.30.0050.0174.76
4.4.20.0030.0194.84
4.4.10.0050.0224.85
4.4.00.0060.0304.76
4.3.110.0050.0214.66
4.3.100.0020.0204.66
4.3.90.0050.0164.63
4.3.80.0020.0274.59
4.3.70.0060.0244.63
4.3.60.0050.0184.63
4.3.50.0030.0164.63
4.3.40.0010.0264.54
4.3.30.0010.0173.30
4.3.20.0020.0163.28
4.3.10.0030.0153.24
4.3.00.0130.0207.16

preferences:
45.81 ms | 401 KiB | 5 Q