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' 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.40.0040.01118.83
8.3.30.0110.00418.93
8.3.20.0000.00720.39
8.3.10.0000.00723.51
8.3.00.0030.00619.25
8.2.170.0150.00322.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00726.16
8.2.120.0040.00421.09
8.2.110.0030.00621.12
8.2.100.0070.00417.84
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0050.00317.75
8.2.60.0000.00818.04
8.2.50.0050.00318.07
8.2.40.0000.01120.07
8.2.30.0070.00018.18
8.2.20.0040.00417.69
8.2.10.0000.00718.11
8.2.00.0000.00717.83
8.1.270.0030.00523.83
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0110.00023.66
8.1.230.0060.00622.61
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0070.00317.11
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0080.00418.50
8.1.160.0050.00321.95
8.1.150.0000.00718.89
8.1.140.0000.00817.38
8.1.130.0000.00717.79
8.1.120.0000.00817.37
8.1.110.0000.00717.43
8.1.100.0030.00417.31
8.1.90.0000.00817.41
8.1.80.0040.00417.46
8.1.70.0040.00417.20
8.1.60.0030.00617.43
8.1.50.0000.00817.47
8.1.40.0030.00617.51
8.1.30.0040.00417.50
8.1.20.0040.00417.66
8.1.10.0050.00317.65
8.1.00.0030.00517.57
8.0.300.0040.00418.77
8.0.290.0000.00716.84
8.0.280.0000.00718.50
8.0.270.0030.00317.33
8.0.260.0000.00617.32
8.0.250.0000.00717.09
8.0.240.0070.00017.02
8.0.230.0030.00317.13
8.0.220.0000.00717.07
8.0.210.0040.00417.05
8.0.200.0030.00316.98
8.0.190.0040.00417.04
8.0.180.0080.00017.02
8.0.170.0000.00817.09
8.0.160.0080.00017.06
8.0.150.0100.00016.87
8.0.140.0070.00016.96
8.0.130.0080.00013.36
8.0.120.0020.00516.99
8.0.110.0040.00417.03
8.0.100.0070.00017.00
8.0.90.0000.00716.86
8.0.80.0070.01017.00
8.0.70.0040.00417.01
8.0.60.0050.00217.02
8.0.50.0040.00417.11
8.0.30.0110.00817.00
8.0.20.0070.01117.40
8.0.10.0030.00716.85
8.0.00.0160.00316.80
7.4.330.0050.00015.15
7.4.320.0060.00016.64
7.4.300.0000.00816.59
7.4.290.0040.00416.51
7.4.280.0040.00416.41
7.4.270.0000.00716.42
7.4.260.0040.00416.60
7.4.250.0060.00316.58
7.4.240.0000.00716.55
7.4.230.0000.00716.71
7.4.220.0110.00716.55
7.4.210.0150.00616.62
7.4.200.0040.00316.40
7.4.160.0030.01316.55
7.4.150.0130.00317.40
7.4.140.0070.01317.86
7.4.130.0050.01416.60
7.4.120.0130.00516.46
7.4.110.0130.01016.72
7.4.100.0170.00016.52
7.4.90.0080.01216.48
7.4.80.0070.01019.39
7.4.70.0070.01016.46
7.4.60.0090.00616.39
7.4.50.0030.00516.37
7.4.40.0070.01016.47
7.4.30.0090.00616.42
7.4.00.0030.01314.84
7.3.330.0060.00313.20
7.3.320.0000.00713.16
7.3.310.0030.00316.18
7.3.300.0000.00716.30
7.3.290.0090.00616.37
7.3.280.0080.00916.40
7.3.270.0070.01117.40
7.3.260.0150.00916.64
7.3.250.0120.00616.37
7.3.240.0090.00916.42
7.3.230.0110.00716.59
7.3.210.0130.00316.39
7.3.200.0130.00919.39
7.3.190.0060.01416.49
7.3.180.0030.01316.58
7.3.170.0100.00616.67
7.3.160.0060.00916.54
7.2.330.0040.01416.68
7.2.320.0130.01016.49
7.2.310.0110.00516.59
7.2.300.0100.00716.56
7.2.290.0030.01216.73
7.1.200.0070.00715.78
7.1.70.0040.00416.98
7.1.60.0170.00719.40
7.1.50.0100.01016.88
7.1.00.0030.07722.28
7.0.200.0280.00614.76
7.0.140.0130.06022.00
7.0.60.0100.07020.06
7.0.50.0030.05017.73
7.0.40.0100.07019.96
7.0.30.0300.07720.11
7.0.20.0270.07320.09
7.0.10.0070.05320.23
7.0.00.0070.06020.25
5.6.280.0030.07021.12
5.6.210.0070.07020.70
5.6.200.0070.08018.19
5.6.190.0070.09320.77
5.6.180.0330.06320.47
5.6.170.0230.03720.61
5.6.160.0070.07720.57
5.6.150.0030.08318.15
5.6.140.0030.04318.18
5.6.130.0100.04718.21
5.6.120.0100.05721.15
5.6.110.0030.08720.88
5.6.100.0130.07320.88
5.6.90.0170.07020.97
5.6.80.0070.08320.53
5.5.350.0200.04320.43
5.5.340.0000.04717.99
5.5.330.0070.05020.56
5.5.320.0330.03320.36
5.5.310.0470.07320.19
5.5.300.0030.06017.98
5.5.290.0070.04718.03
5.5.280.0030.04320.65
5.5.270.0100.08320.79
5.5.260.0070.06720.95
5.5.250.0170.07320.46
5.5.240.0030.04320.07
5.4.450.0770.05319.61
5.4.440.0500.07319.55
5.4.430.0100.07719.54
5.4.420.0770.05319.64
5.4.410.0070.05318.73
5.4.400.0200.05018.62
5.4.390.0630.06018.69
5.4.380.0270.04018.69
5.4.370.0030.04718.74
5.4.360.0030.04018.74
5.4.350.0060.04112.02
5.4.340.0040.04412.01
5.4.320.0030.03912.50
5.4.310.0050.03812.49
5.4.300.0040.03812.50
5.4.290.0080.03512.50
5.4.280.0060.03512.39
5.4.270.0060.03512.39
5.4.260.0090.04012.39
5.4.250.0070.03612.39
5.4.240.0080.03412.39
5.4.230.0060.03512.38
5.4.220.0040.03612.38
5.4.210.0040.03612.38
5.4.200.0060.03912.38
5.4.190.0070.03912.38
5.4.180.0060.03612.38
5.4.170.0050.03712.39
5.4.160.0070.03512.39
5.4.150.0060.03812.38
5.4.140.0040.04012.07
5.4.130.0070.03912.05
5.4.120.0040.03812.01
5.4.110.0070.03412.00
5.4.100.0070.03312.01
5.4.90.0070.03512.01
5.4.80.0060.03412.00
5.4.70.0060.03412.00
5.4.60.0080.04012.00
5.4.50.0050.04112.00
5.4.40.0040.03511.99
5.4.30.0030.03711.99
5.4.20.0060.04011.99
5.4.10.0060.03411.99
5.4.00.0040.03711.48
5.3.290.0090.03912.80
5.3.280.0040.03912.71
5.3.270.0090.03512.73
5.3.260.0070.03912.71
5.3.250.0060.04312.72
5.3.240.0080.03412.72
5.3.230.0050.03812.71
5.3.220.0030.03912.68
5.3.210.0070.03612.68
5.3.200.0050.03612.68
5.3.190.0070.04212.68
5.3.180.0090.03212.67
5.3.170.0080.04012.67
5.3.160.0080.04512.67
5.3.150.0040.04612.67
5.3.140.0070.03512.66
5.3.130.0070.03612.66
5.3.120.0060.03912.66
5.3.110.0040.04012.66
5.3.100.0040.03712.12
5.3.90.0060.03612.09
5.3.80.0050.03612.08
5.3.70.0090.04212.09
5.3.60.0040.03812.07
5.3.50.0050.04112.02
5.3.40.0050.03612.02
5.3.30.0070.03311.97
5.3.20.0080.03211.75
5.3.10.0080.03011.72
5.3.00.0050.04311.71
5.2.170.0070.0339.21
5.2.160.0100.0329.21
5.2.150.0050.0309.21
5.2.140.0010.0339.21
5.2.130.0040.0289.17
5.2.120.0050.0279.17
5.2.110.0040.0299.18
5.2.100.0040.0299.17
5.2.90.0040.0299.17
5.2.80.0050.0299.16
5.2.70.0030.0319.16
5.2.60.0040.0309.12
5.2.50.0030.0319.09
5.2.40.0030.0319.07
5.2.30.0040.0319.04
5.2.20.0070.0279.03
5.2.10.0030.0298.94
5.2.00.0040.0318.80
5.1.60.0030.0248.08
5.1.50.0060.0228.08
5.1.40.0030.0258.06
5.1.30.0060.0248.41
5.1.20.0060.0258.43
5.1.10.0060.0268.16
5.1.00.0040.0258.16
5.0.50.0060.0196.63
5.0.40.0070.0246.50
5.0.30.0020.0336.31
5.0.20.0040.0186.27
5.0.10.0030.0206.25
5.0.00.0040.0306.24
4.4.90.0030.0154.78
4.4.80.0030.0154.76
4.4.70.0020.0164.75
4.4.60.0020.0164.76
4.4.50.0030.0154.77
4.4.40.0020.0274.71
4.4.30.0030.0154.76
4.4.20.0030.0174.85
4.4.10.0010.0174.85
4.4.00.0020.0274.75
4.3.110.0050.0134.67
4.3.100.0000.0184.66
4.3.90.0000.0184.63
4.3.80.0070.0294.58
4.3.70.0020.0154.63
4.3.60.0020.0164.63
4.3.50.0030.0154.63
4.3.40.0000.0274.54
4.3.30.0020.0163.30
4.3.20.0010.0173.28
4.3.10.0030.0143.23
4.3.00.0130.0207.16

preferences:
38.08 ms | 400 KiB | 5 Q