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 = strpos( $target, $bad ); $substr = substr( $target, $pos,1 ); // 5.6 if ( $substr === $bad ) { 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.0090.00916.38
8.3.50.0100.00922.82
8.3.40.0110.00418.58
8.3.30.0040.01118.81
8.3.20.0080.00020.22
8.3.10.0000.00923.61
8.3.00.0030.00519.38
8.2.180.0090.00618.30
8.2.170.0100.00722.96
8.2.160.0060.00920.32
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0110.00726.16
8.2.120.0080.00021.02
8.2.110.0050.00322.08
8.2.100.0090.00317.72
8.2.90.0030.00519.21
8.2.80.0000.00917.97
8.2.70.0040.00417.61
8.2.60.0080.00018.03
8.2.50.0030.00718.07
8.2.40.0040.00419.95
8.2.30.0040.00418.00
8.2.20.0000.00717.65
8.2.10.0030.00618.07
8.2.00.0060.00317.65
8.1.280.0090.00625.92
8.1.270.0030.00623.99
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0030.00623.63
8.1.230.0110.00019.09
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0080.00417.23
8.1.190.0040.00417.00
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0100.00022.01
8.1.150.0000.00718.79
8.1.140.0040.00417.31
8.1.130.0030.00317.82
8.1.120.0030.00317.43
8.1.110.0080.00017.42
8.1.100.0040.00417.32
8.1.90.0000.00717.32
8.1.80.0000.00717.46
8.1.70.0030.00317.36
8.1.60.0000.00817.54
8.1.50.0030.00517.44
8.1.40.0040.00417.47
8.1.30.0040.00417.63
8.1.20.0000.00817.48
8.1.10.0000.00717.63
8.1.00.0040.00417.55
8.0.300.0050.00218.77
8.0.290.0070.00016.75
8.0.280.0020.00518.40
8.0.270.0030.00317.25
8.0.260.0030.00317.28
8.0.250.0000.00716.84
8.0.240.0040.00416.80
8.0.230.0080.00016.87
8.0.220.0050.00316.86
8.0.210.0070.00016.88
8.0.200.0030.00316.89
8.0.190.0070.00016.91
8.0.180.0070.00016.88
8.0.170.0040.00416.87
8.0.160.0030.00416.79
8.0.150.0030.00716.67
8.0.140.0040.00416.82
8.0.130.0070.00013.24
8.0.120.0030.00616.77
8.0.110.0040.00416.73
8.0.100.0030.00516.71
8.0.90.0000.00716.75
8.0.80.0100.00716.86
8.0.70.0040.00416.84
8.0.60.0000.00716.91
8.0.50.0000.00816.80
8.0.30.0140.00417.05
8.0.20.0090.01017.40
8.0.10.0060.00316.89
8.0.00.0080.00916.76
7.4.330.0060.00015.20
7.4.320.0030.00316.45
7.4.300.0040.00416.54
7.4.290.0070.00016.45
7.4.280.0000.00716.52
7.4.270.0050.00216.39
7.4.260.0000.00816.49
7.4.250.0040.00416.48
7.4.240.0020.00516.62
7.4.230.0060.00016.71
7.4.220.0030.01516.43
7.4.210.0090.00616.71
7.4.200.0000.00716.71
7.4.160.0130.00416.48
7.4.150.0120.00617.40
7.4.140.0160.00517.86
7.4.130.0080.01116.55
7.4.120.0010.01616.46
7.4.110.0140.00416.36
7.4.100.0130.00716.49
7.4.90.0120.00616.50
7.4.80.0110.00619.39
7.4.70.0060.01016.46
7.4.60.0060.01016.57
7.4.50.0030.00616.51
7.4.40.0100.00716.68
7.4.30.0120.00916.59
7.4.00.0000.01314.71
7.3.330.0000.00713.27
7.3.320.0040.00413.05
7.3.310.0040.00416.10
7.3.300.0060.00316.16
7.3.290.0090.01016.36
7.3.280.0090.00916.28
7.3.270.0100.01017.40
7.3.260.0030.01416.58
7.3.250.0120.00516.27
7.3.240.0000.01616.46
7.3.230.0090.00616.68
7.3.210.0030.01416.30
7.3.200.0080.00819.39
7.3.190.0140.00816.33
7.3.180.0110.00416.30
7.3.170.0130.00316.29
7.3.160.0030.01216.47
7.2.330.0130.01016.49
7.2.320.0130.00316.59
7.2.310.0030.01316.61
7.2.300.0030.01416.65
7.2.290.0060.01016.54
7.1.70.0110.00016.96
7.1.60.0160.01019.40
7.1.50.0040.01416.87
7.1.00.0070.07022.54
7.0.200.0280.00714.61
7.0.140.0030.07321.95
7.0.60.0070.08019.91
7.0.50.0000.06717.90
7.0.40.0070.07720.10
7.0.30.0370.07320.33
7.0.20.0230.06720.16
7.0.10.0400.06020.32
7.0.00.0100.05320.09
5.6.280.0100.06721.09
5.6.210.0100.07720.51
5.6.200.0070.05318.21
5.6.190.0030.04720.79
5.6.180.0070.03720.45
5.6.170.0230.08020.44
5.6.160.0070.08720.62
5.6.150.0070.04018.17
5.6.140.0130.07318.15
5.6.130.0030.04318.14
5.6.120.0030.04320.98
5.6.110.0130.07321.08
5.6.100.0130.08020.97
5.6.90.0200.05720.96
5.6.80.0100.08020.53
5.6.70.0370.06320.27
5.5.350.0400.06020.53
5.5.340.0100.08317.97
5.5.330.0070.05020.27
5.5.320.0000.08720.27
5.5.310.0230.04320.26
5.5.300.0130.07017.95
5.5.290.0030.05017.97
5.5.280.0030.05720.88
5.5.270.0000.04320.63
5.5.260.0030.08020.95
5.5.250.0100.07020.66
5.5.240.0070.08320.12
5.4.450.0770.06019.46
5.4.440.0970.06319.46
5.4.430.0370.05719.66
5.4.420.0800.06019.54
5.4.410.0100.05719.05
5.4.400.0330.05718.80
5.4.390.0530.04018.73
5.4.380.0130.05318.53
5.4.370.0000.04718.59
5.4.360.0170.02718.79
5.4.350.0040.03812.02
5.4.340.0080.03412.01
5.4.320.0060.03612.50
5.4.310.0060.03812.49
5.4.300.0070.03612.50
5.4.290.0090.03612.49
5.4.280.0030.04612.39
5.4.270.0090.04312.39
5.4.260.0080.04212.39
5.4.250.0090.03912.39
5.4.240.0100.04212.39
5.4.230.0100.04712.38
5.4.220.0050.06912.39
5.4.210.0170.05112.38
5.4.200.0100.05312.38
5.4.190.0110.06212.38
5.4.180.0150.05412.38
5.4.170.0080.05812.39
5.4.160.0110.05612.39
5.4.150.0120.04812.38
5.4.140.0070.05512.07
5.4.130.0070.04412.05
5.4.120.0050.03712.01
5.4.110.0050.05112.01
5.4.100.0030.03812.01
5.4.90.0070.03512.01
5.4.80.0050.03712.01
5.4.70.0110.02912.01
5.4.60.0040.04312.00
5.4.50.0050.03612.00
5.4.40.0060.03511.99
5.4.30.0070.03411.99
5.4.20.0040.03711.99
5.4.10.0040.03711.99
5.4.00.0040.03811.48
5.3.290.0130.04912.80
5.3.280.0050.04812.71
5.3.270.0090.03612.72
5.3.260.0070.03712.72
5.3.250.0050.04012.72
5.3.240.0050.04012.72
5.3.230.0070.04112.71
5.3.220.0030.04212.68
5.3.210.0080.03712.68
5.3.200.0070.03612.68
5.3.190.0100.03712.68
5.3.180.0050.04312.67
5.3.170.0060.03612.67
5.3.160.0050.03712.67
5.3.150.0050.03812.68
5.3.140.0060.03612.66
5.3.130.0040.04012.66
5.3.120.0070.03812.66
5.3.110.0090.03512.66
5.3.100.0090.03412.12
5.3.90.0050.03712.09
5.3.80.0030.03912.09
5.3.70.0030.03812.09
5.3.60.0100.03212.07
5.3.50.0070.03612.02
5.3.40.0040.03812.02
5.3.30.0070.03411.98
5.3.20.0070.04211.75
5.3.10.0080.03311.72
5.3.00.0070.03511.71
5.2.170.0070.0289.21
5.2.160.0070.0279.21
5.2.150.0050.0309.21
5.2.140.0030.0319.21
5.2.130.0050.0289.17
5.2.120.0080.0259.17
5.2.110.0040.0299.18
5.2.100.0060.0279.17
5.2.90.0050.0299.17
5.2.80.0030.0329.16
5.2.70.0060.0299.16
5.2.60.0060.0289.12
5.2.50.0030.0319.09
5.2.40.0000.0339.07
5.2.30.0020.0329.04
5.2.20.0050.0299.03
5.2.10.0050.0278.93
5.2.00.0050.0288.80
5.1.60.0030.0248.08
5.1.50.0060.0238.08
5.1.40.0050.0248.06
5.1.30.0070.0238.41
5.1.20.0040.0278.43
5.1.10.0060.0248.16
5.1.00.0010.0288.16
5.0.50.0060.0186.64
5.0.40.0020.0206.49
5.0.30.0060.0336.30
5.0.20.0040.0186.27
5.0.10.0020.0216.25
5.0.00.0040.0296.25
4.4.90.0020.0154.78
4.4.80.0000.0184.75
4.4.70.0030.0154.76
4.4.60.0020.0164.76
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0000.0184.76
4.4.20.0040.0144.84
4.4.10.0020.0164.85
4.4.00.0020.0264.75
4.3.110.0030.0154.66
4.3.100.0010.0174.66
4.3.90.0040.0134.63
4.3.80.0030.0234.58
4.3.70.0020.0154.63
4.3.60.0010.0184.62
4.3.50.0050.0134.63
4.3.40.0040.0224.53
4.3.30.0010.0173.30
4.3.20.0000.0183.28
4.3.10.0030.0153.23
4.3.00.0170.0177.09

preferences:
40.76 ms | 401 KiB | 5 Q