3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const AB♥ = "alphabet"; } $rc = new ReflectionClass("Test"); //$bad = "♥"; $bad = chr(0xe2); $key = array_keys( $rc->getConstants() ); $target = $key[ 0 ]; $pos = mb_strpos( $target, $bad ); var_dump( 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.0140.00016.50
8.3.50.0150.00522.88
8.3.40.0040.01118.82
8.3.30.0110.00319.08
8.3.20.0060.00320.29
8.3.10.0040.00423.48
8.3.00.0050.00319.38
8.2.180.0040.01116.36
8.2.170.0040.01122.96
8.2.160.0040.01120.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0140.00326.16
8.2.120.0040.00420.91
8.2.110.0000.00822.27
8.2.100.0090.00317.91
8.2.90.0000.00819.26
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0040.00418.04
8.2.50.0030.00618.07
8.2.40.0060.00319.88
8.2.30.0040.00418.05
8.2.20.0050.00217.67
8.2.10.0050.00218.20
8.2.00.0030.00517.63
8.1.280.0150.00025.92
8.1.270.0080.00023.74
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0060.00323.98
8.1.230.0070.00419.01
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0080.00417.23
8.1.190.0050.00317.13
8.1.180.0000.00818.10
8.1.170.0050.00318.46
8.1.160.0080.00022.00
8.1.150.0000.00718.93
8.1.140.0080.00017.46
8.1.130.0000.00717.85
8.1.120.0040.00417.39
8.1.110.0040.00417.39
8.1.100.0040.00417.31
8.1.90.0030.00317.43
8.1.80.0030.00317.34
8.1.70.0030.00317.41
8.1.60.0040.00417.55
8.1.50.0060.00317.52
8.1.40.0000.00917.46
8.1.30.0040.00417.55
8.1.20.0000.00817.64
8.1.10.0050.00317.68
8.1.00.0000.00817.60
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.52
8.0.270.0040.00417.26
8.0.260.0000.00618.53
8.0.250.0040.00417.09
8.0.240.0030.00316.98
8.0.230.0000.00717.05
8.0.220.0060.00016.93
8.0.210.0070.00017.07
8.0.200.0030.00317.07
8.0.190.0000.00717.00
8.0.180.0070.00017.05
8.0.170.0080.00017.09
8.0.160.0000.00717.00
8.0.150.0030.00716.97
8.0.140.0050.00216.99
8.0.130.0040.00413.49
8.0.120.0070.00017.02
8.0.110.0000.00717.08
8.0.100.0000.00716.98
8.0.90.0000.00716.98
8.0.80.0090.00916.91
8.0.70.0040.00417.08
8.0.60.0000.00716.98
8.0.50.0000.00816.85
8.0.30.0120.00817.17
8.0.20.0060.01717.40
8.0.10.0000.00816.95
8.0.00.0120.00416.97
7.4.330.0050.00015.00
7.4.320.0030.00316.48
7.4.300.0070.00016.43
7.4.290.0030.00316.61
7.4.280.0040.00416.43
7.4.270.0030.00316.59
7.4.260.0050.00316.61
7.4.250.0040.00416.39
7.4.240.0040.00416.59
7.4.230.0070.00016.64
7.4.220.0000.01716.57
7.4.210.0140.00716.64
7.4.200.0040.00416.49
7.4.160.0060.00916.38
7.4.150.0150.00417.40
7.4.140.0050.01217.86
7.4.130.0090.01016.51
7.4.120.0110.00616.56
7.4.110.0120.00616.60
7.4.100.0070.01016.48
7.4.90.0130.00916.48
7.4.80.0090.00919.39
7.4.70.0170.00716.70
7.4.60.0070.01016.74
7.4.50.0080.00016.60
7.4.40.0030.01316.67
7.4.30.0130.00716.52
7.4.00.0070.01014.89
7.3.330.0040.00413.13
7.3.320.0030.00313.17
7.3.310.0080.00016.35
7.3.300.0000.00816.35
7.3.290.0140.00616.34
7.3.280.0080.01016.35
7.3.270.0070.01017.40
7.3.260.0330.02016.41
7.3.250.0100.00616.51
7.3.240.0130.00316.55
7.3.230.0140.00616.66
7.3.210.0070.01116.35
7.3.200.0110.00719.39
7.3.190.0120.00916.61
7.3.180.0100.00616.41
7.3.170.0070.01316.49
7.3.160.0040.01216.52
7.3.10.0040.01116.64
7.3.00.0060.00616.57
7.2.330.0180.00016.36
7.2.320.0060.01016.38
7.2.310.0090.01216.55
7.2.300.0080.00816.37
7.2.290.0060.01216.55
7.2.130.0110.00316.84
7.2.120.0070.00316.79
7.2.110.0060.00917.02
7.2.100.0030.01016.56
7.2.90.0110.00716.93
7.2.80.0000.01616.95
7.2.70.0000.01016.96
7.2.60.0060.00616.74
7.2.50.0060.00916.64
7.2.40.0000.01117.03
7.2.30.0070.00716.98
7.2.20.0060.00916.93
7.2.10.0080.00317.04
7.2.00.0070.01016.73
7.1.250.0030.00915.70
7.1.200.0000.00915.81
7.1.70.0030.00316.87
7.1.60.0090.01519.40
7.1.50.0060.01016.91
7.1.00.0070.07322.30
7.0.200.0300.01014.68
7.0.140.0000.07721.97
7.0.60.0030.04319.97
7.0.50.0100.07317.85
7.0.40.0030.04320.13
7.0.30.0270.05020.06
7.0.20.0200.05020.30
7.0.10.0130.08320.22
7.0.00.0000.06020.18
5.6.280.0130.06321.15
5.6.210.0130.07720.50
5.6.200.0070.08318.28
5.6.190.0130.05320.55
5.6.180.0270.05020.58
5.6.170.0230.04320.71
5.6.160.0030.09020.43
5.6.150.0100.03318.29
5.6.140.0070.08018.11
5.6.130.0100.05718.16
5.6.120.0070.04721.02
5.6.110.0200.07321.13
5.6.100.0070.03721.16
5.6.90.0230.06020.99
5.6.80.0100.07720.53
5.5.350.0330.07020.36
5.5.340.0030.04318.09
5.5.330.0100.03320.37
5.5.320.0200.07320.26
5.5.310.0430.05020.26
5.5.300.0130.04017.94
5.5.290.0070.08718.03
5.5.280.0030.04020.84
5.5.270.0100.07320.68
5.5.260.0070.07320.88
5.5.250.0100.07320.70
5.5.240.0100.03320.12
5.4.450.0700.05719.34
5.4.440.0700.04719.43
5.4.430.0930.05019.63
5.4.420.0630.05719.55
5.4.410.0200.06718.95
5.4.400.3000.06018.76
5.4.390.0370.05318.62
5.4.380.0230.04318.61
5.4.370.0130.05018.71
5.4.360.0130.03718.64
5.4.350.0060.04212.02
5.4.340.0100.04212.01
5.4.320.0080.03312.50
5.4.310.0040.04012.50
5.4.300.0070.03512.50
5.4.290.0050.03812.50
5.4.280.0070.03312.39
5.4.270.0050.03612.39
5.4.260.0090.03512.39
5.4.250.0050.04612.39
5.4.240.0040.04412.39
5.4.230.0090.03712.38
5.4.220.0050.03612.39
5.4.210.0020.03912.38
5.4.200.0030.05012.38
5.4.190.0030.04512.38
5.4.180.0110.05012.38
5.4.170.0040.03712.39
5.4.160.0060.03812.39
5.4.150.0080.03412.38
5.4.140.0030.04012.07
5.4.130.0060.03512.05
5.4.120.0070.03312.01
5.4.110.0050.03712.01
5.4.100.0050.04012.00
5.4.90.0030.04012.00
5.4.80.0030.03912.01
5.4.70.0050.04112.00
5.4.60.0080.04712.00
5.4.50.0090.03312.00
5.4.40.0080.03811.99
5.4.30.0030.04911.99
5.4.20.0050.04311.99
5.4.10.0120.03311.99
5.4.00.0070.03911.48
5.3.290.0060.04012.80
5.3.280.0080.03612.71
5.3.270.0080.03712.72
5.3.260.0060.04212.71
5.3.250.0060.03712.72
5.3.240.0060.03612.72
5.3.230.0050.03812.71
5.3.220.0060.03712.68
5.3.210.0060.03812.68
5.3.200.0070.03512.68
5.3.190.0050.03812.68
5.3.180.0080.03312.67
5.3.170.0070.04112.67
5.3.160.0070.03712.67
5.3.150.0110.03512.68
5.3.140.0090.03412.66
5.3.130.0020.04212.66
5.3.120.0070.03812.65
5.3.110.0080.03812.66
5.3.100.0040.04312.12
5.3.90.0130.05312.09
5.3.80.0070.03512.08
5.3.70.0090.03412.08
5.3.60.0040.03812.07
5.3.50.0070.03412.02
5.3.40.0080.04612.02
5.3.30.0050.03411.98
5.3.20.0020.03911.76
5.3.10.0050.03711.72
5.3.00.0040.03811.71
5.2.170.0050.0309.21
5.2.160.0050.0309.21
5.2.150.0060.0299.21
5.2.140.0060.0299.21
5.2.130.0060.0299.17
5.2.120.0060.0349.17
5.2.110.0080.0279.18
5.2.100.0090.0329.17
5.2.90.0050.0339.17
5.2.80.0040.0369.17
5.2.70.0080.0339.16
5.2.60.0050.0339.12
5.2.50.0050.0379.09
5.2.40.0080.0289.06
5.2.30.0040.0329.04
5.2.20.0030.0309.03
5.2.10.0030.0338.94
5.2.00.0040.0298.80
5.1.60.0050.0248.08
5.1.50.0060.0238.07
5.1.40.0050.0258.06
5.1.30.0050.0298.41
5.1.20.0080.0248.43
5.1.10.0040.0268.15
5.1.00.0030.0268.16
5.0.50.0070.0196.63
5.0.40.0030.0236.50
5.0.30.0050.0386.31
5.0.20.0060.0216.27
5.0.10.0030.0216.25
5.0.00.0010.0336.25
4.4.90.0020.0164.78
4.4.80.0010.0174.75
4.4.70.0030.0304.75
4.4.60.0020.0174.76
4.4.50.0030.0244.77
4.4.40.0030.0254.71
4.4.30.0050.0254.76
4.4.20.0040.0244.84
4.4.10.0030.0154.85
4.4.00.0030.0334.76
4.3.110.0050.0164.67
4.3.100.0050.0174.67
4.3.90.0040.0204.64
4.3.80.0020.0254.58
4.3.70.0030.0154.63
4.3.60.0040.0144.63
4.3.50.0030.0154.63
4.3.40.0050.0324.54
4.3.30.0010.0183.30
4.3.20.0050.0133.28
4.3.10.0030.0153.24
4.3.00.0130.0237.16

preferences:
32.73 ms | 401 KiB | 5 Q