3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const AB♥ = "alphabet"; } $rc = new ReflectionClass("Test"); //$bad = "♥"; $bad = chr(e2); $key = array_keys( $rc->getConstants() ); $target = $key[ 0 ]; $pos = strpos( $target, $bad ); var_dump( $pos,mb_substr( $target, $pos,1 )); // 5.6 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.60.0120.00616.61
8.3.50.0080.01022.85
8.3.40.0140.00018.52
8.3.30.0070.00719.20
8.3.20.0000.00720.34
8.3.10.0080.00023.53
8.3.00.0040.00419.26
8.2.180.0060.00918.43
8.2.170.0110.00322.96
8.2.160.0100.01020.44
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0110.00426.16
8.2.120.0040.00421.09
8.2.110.0030.00622.17
8.2.100.0120.00017.80
8.2.90.0100.00019.02
8.2.80.0040.00417.97
8.2.70.0100.00517.35
8.2.60.0050.00317.93
8.2.50.0080.00018.07
8.2.40.0040.00419.86
8.2.30.0040.00418.16
8.2.20.0000.00717.92
8.2.10.0000.00717.98
8.2.00.0040.00417.78
8.1.280.0160.00025.92
8.1.270.0080.00024.01
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00623.79
8.1.230.0070.00319.09
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0090.00017.35
8.1.190.0070.00017.22
8.1.180.0040.00418.10
8.1.170.0000.00818.65
8.1.160.0050.00221.92
8.1.150.0040.00418.80
8.1.140.0040.00417.42
8.1.130.0030.00517.73
8.1.120.0000.00717.54
8.1.110.0070.00017.51
8.1.100.0040.00417.47
8.1.90.0040.00317.51
8.1.80.0040.00417.41
8.1.70.0030.00317.45
8.1.60.0030.00517.57
8.1.50.0050.00317.57
8.1.40.0100.00017.52
8.1.30.0080.00017.59
8.1.20.0020.00517.66
8.1.10.0080.00017.57
8.1.00.0040.00417.54
8.0.300.0040.00418.77
8.0.290.0000.00816.88
8.0.280.0030.00318.47
8.0.270.0000.00717.29
8.0.260.0000.00617.29
8.0.250.0030.00317.09
8.0.240.0040.00417.03
8.0.230.0000.00716.86
8.0.220.0000.00716.98
8.0.210.0070.00016.93
8.0.200.0030.00317.04
8.0.190.0030.00516.95
8.0.180.0030.00316.97
8.0.170.0000.00817.05
8.0.160.0000.00816.93
8.0.150.0070.00316.95
8.0.140.0070.00016.90
8.0.130.0070.00013.44
8.0.120.0000.00716.90
8.0.110.0070.00017.01
8.0.100.0040.00416.93
8.0.90.0000.00716.89
8.0.80.0160.00017.01
8.0.70.0070.00016.86
8.0.60.0040.00416.95
8.0.50.0000.00716.97
8.0.30.0130.00716.99
8.0.20.0120.01017.40
8.0.10.0030.00616.89
8.0.00.0130.00916.91
7.4.330.0050.00015.00
7.4.320.0030.00316.53
7.4.300.0000.00716.51
7.4.290.0070.00016.62
7.4.280.0040.00416.53
7.4.270.0000.00816.61
7.4.260.0030.00316.61
7.4.250.0070.00016.59
7.4.240.0020.00616.59
7.4.230.0000.00616.73
7.4.220.0090.00916.70
7.4.210.0060.00916.57
7.4.200.0000.00716.43
7.4.160.0140.00916.31
7.4.150.0100.00717.40
7.4.140.0080.01117.86
7.4.130.0110.01016.46
7.4.120.0090.01016.54
7.4.110.0130.01016.46
7.4.100.0120.00416.70
7.4.90.0100.01616.55
7.4.80.0130.00319.39
7.4.70.0060.01116.59
7.4.60.0070.01016.40
7.4.50.0000.00516.48
7.4.40.0030.01516.63
7.4.30.0120.00416.66
7.4.00.0030.00814.83
7.3.330.0080.00013.19
7.3.320.0060.00013.34
7.3.310.0030.00316.21
7.3.300.0000.00616.37
7.3.290.0200.00016.40
7.3.280.0070.01016.37
7.3.270.0100.00617.40
7.3.260.0090.00916.71
7.3.250.0140.00516.51
7.3.240.0070.01016.64
7.3.230.0100.00616.68
7.3.210.0070.01116.70
7.3.200.0090.00919.39
7.3.190.0080.00916.29
7.3.180.0100.00616.43
7.3.170.0130.00316.55
7.3.160.0100.00616.57
7.2.330.0160.00416.55
7.2.320.0030.01416.72
7.2.310.0040.01416.51
7.2.300.0070.01016.73
7.2.290.0080.00816.67
7.2.60.0040.01116.89
7.2.00.0030.00719.15
7.1.200.0120.00415.42
7.1.100.0040.00818.34
7.1.70.0000.00817.18
7.1.60.0140.01019.40
7.1.50.0110.00416.98
7.1.00.0030.07722.25
7.0.200.0270.00014.79
7.0.140.0100.06722.16
7.0.60.0000.05720.00
7.0.50.0000.06717.73
7.0.40.0000.04720.09
7.0.30.0370.07720.06
7.0.20.0170.08720.07
7.0.10.0070.08720.33
7.0.00.0100.08020.16
5.6.280.0030.07721.13
5.6.210.0070.09020.52
5.6.200.0070.05018.20
5.6.190.0130.08020.39
5.6.180.0470.06020.61
5.6.170.0370.08020.48
5.6.160.0030.08320.46
5.6.150.0070.03718.29
5.6.140.0070.05718.15
5.6.130.0070.05718.17
5.6.120.0100.07021.04
5.6.110.0170.07720.98
5.6.100.0130.07720.97
5.6.90.0170.07321.03
5.6.80.0070.08020.40
5.5.350.0230.03720.49
5.5.340.0000.05017.98
5.5.330.0130.07020.42
5.5.320.2600.04720.27
5.5.310.0270.08020.41
5.5.300.0070.08717.93
5.5.290.0100.03718.02
5.5.280.0200.06320.76
5.5.270.0030.04320.66
5.5.260.0100.06320.67
5.5.250.0030.08720.49
5.5.240.0000.07320.27
5.4.450.0030.07019.36
5.4.440.0770.06319.18
5.4.430.0170.04719.32
5.4.420.0130.05319.38
5.4.410.0070.05719.07
5.4.400.0130.05318.87
5.4.390.0130.05318.59
5.4.380.0030.06718.76
5.4.370.0030.04318.77
5.4.360.0070.03718.82
5.4.350.0060.03412.02
5.4.340.0080.05212.01
5.4.320.0060.03412.50
5.4.310.0060.03612.49
5.4.300.0100.03212.50
5.4.290.0090.04412.49
5.4.280.0050.03512.39
5.4.270.0040.03712.39
5.4.260.0060.03612.39
5.4.250.0060.03812.39
5.4.240.0070.03412.39
5.4.230.0050.03812.38
5.4.220.0090.03912.38
5.4.210.0070.03312.38
5.4.200.0060.03612.39
5.4.190.0040.03712.38
5.4.180.0050.03612.38
5.4.170.0080.03312.39
5.4.160.0020.03912.39
5.4.150.0040.03712.38
5.4.140.0030.04212.07
5.4.130.0030.03812.05
5.4.120.0060.03712.01
5.4.110.0040.03812.01
5.4.100.0070.03312.01
5.4.90.0080.03612.01
5.4.80.0050.03612.01
5.4.70.0050.03512.00
5.4.60.0060.03912.00
5.4.50.0080.03612.01
5.4.40.0080.03912.00
5.4.30.0070.03411.99
5.4.20.0030.03711.99
5.4.10.0060.03511.99
5.4.00.0060.03511.48
5.3.290.0040.04012.80
5.3.280.0090.03412.71
5.3.270.0060.03912.73
5.3.260.0100.03512.72
5.3.250.0040.04112.72
5.3.240.0080.03412.72
5.3.230.0070.04212.71
5.3.220.0070.03712.68
5.3.210.0030.04112.68
5.3.200.0060.03512.68
5.3.190.0060.03712.68
5.3.180.0070.03612.67
5.3.170.0070.03412.66
5.3.160.0040.03712.68
5.3.150.0040.03912.68
5.3.140.0070.03412.66
5.3.130.0040.04012.66
5.3.120.0040.04112.66
5.3.110.0070.03912.66
5.3.100.0070.03712.12
5.3.90.0080.04012.09
5.3.80.0060.03512.08
5.3.70.0080.03412.09
5.3.60.0060.03512.07
5.3.50.0050.03612.02
5.3.40.0050.03612.02
5.3.30.0060.03411.97
5.3.20.0080.03811.76
5.3.10.0080.03511.72
5.3.00.0040.04911.71
5.2.170.0070.0289.21
5.2.160.0060.0329.21
5.2.150.0050.0419.21
5.2.140.0070.0309.21
5.2.130.0030.0309.16
5.2.120.0040.0289.17
5.2.110.0110.0299.18
5.2.100.0050.0299.17
5.2.90.0070.0309.17
5.2.80.0070.0279.16
5.2.70.0060.0339.16
5.2.60.0040.0369.12
5.2.50.0050.0299.08
5.2.40.0040.0319.06
5.2.30.0050.0299.04
5.2.20.0030.0309.03
5.2.10.0050.0278.93
5.2.00.0040.0298.80
5.1.60.0020.0268.08
5.1.50.0040.0278.07
5.1.40.0090.0208.06
5.1.30.0040.0278.41
5.1.20.0040.0278.43
5.1.10.0030.0308.15
5.1.00.0050.0258.16
5.0.50.0040.0236.64
5.0.40.0040.0286.49
5.0.30.0070.0366.30
5.0.20.0010.0226.27
5.0.10.0040.0196.25
5.0.00.0030.0316.24
4.4.90.0010.0174.78
4.4.80.0020.0164.76
4.4.70.0020.0164.75
4.4.60.0020.0164.75
4.4.50.0030.0154.77
4.4.40.0050.0234.71
4.4.30.0050.0144.76
4.4.20.0000.0184.85
4.4.10.0040.0144.84
4.4.00.0010.0264.76
4.3.110.0020.0164.67
4.3.100.0040.0184.67
4.3.90.0060.0164.64
4.3.80.0060.0234.59
4.3.70.0030.0144.63
4.3.60.0020.0174.63
4.3.50.0040.0174.63
4.3.40.0050.0234.54
4.3.30.0030.0153.30
4.3.20.0020.0163.28
4.3.10.0060.0133.24
4.3.00.0030.0206.84

preferences:
37.32 ms | 401 KiB | 5 Q