3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const ABC♥ = "alphabet"; } $class = new ReflectionClass("Test"); $bad_char = "♥"; $constants = $class->getConstants(); $keys = array_keys($constants); for ( $i=0, $ct=count($keys); $i < $ct; $i++) { $target = $keys[ $i ]; //php5.6: if ( mb_substr( $target, -1,1) == $bad_char ) { $strpos = strpos( $target, $bad_char); var_dump( $strpos,mb_substr( $target, $strpos,1)); if ($strpos !== 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.01116.88
8.3.50.0120.01022.89
8.3.40.0040.01118.76
8.3.30.0070.01019.09
8.3.20.0040.00420.41
8.3.10.0080.00023.48
8.3.00.0080.00019.50
8.2.180.0060.00918.54
8.2.170.0140.00322.96
8.2.160.0100.00720.57
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0110.00726.16
8.2.120.0040.00420.90
8.2.110.0030.00620.47
8.2.100.0080.00417.91
8.2.90.0060.00318.09
8.2.80.0000.00819.36
8.2.70.0030.00517.93
8.2.60.0000.00918.05
8.2.50.0000.00918.10
8.2.40.0000.00920.61
8.2.30.0030.00618.07
8.2.20.0040.00417.64
8.2.10.0050.00218.18
8.2.00.0060.00317.64
8.1.280.0000.01525.92
8.1.270.0080.00023.97
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0040.00422.54
8.1.230.0090.00322.67
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0060.00617.35
8.1.190.0000.00917.22
8.1.180.0040.00418.10
8.1.170.0080.00018.50
8.1.160.0070.00022.10
8.1.150.0000.00718.91
8.1.140.0030.00517.47
8.1.130.0030.00317.80
8.1.120.0070.00017.45
8.1.110.0000.00817.37
8.1.100.0030.00317.38
8.1.90.0000.00817.40
8.1.80.0040.00417.52
8.1.70.0000.00717.32
8.1.60.0030.00617.56
8.1.50.0060.00317.54
8.1.40.0060.00317.59
8.1.30.0000.00817.73
8.1.20.0040.00417.72
8.1.10.0050.00317.61
8.1.00.0040.00417.50
8.0.300.0000.00722.01
8.0.290.0040.00416.75
8.0.280.0040.00418.53
8.0.270.0040.00417.34
8.0.260.0030.00317.38
8.0.250.0000.00716.98
8.0.240.0040.00417.02
8.0.230.0070.00016.97
8.0.220.0030.00316.95
8.0.210.0000.00817.04
8.0.200.0060.00017.10
8.0.190.0000.00817.11
8.0.180.0000.00717.06
8.0.170.0040.00417.00
8.0.160.0040.00416.96
8.0.150.0000.00917.08
8.0.140.0070.00017.05
8.0.130.0060.00013.50
8.0.120.0000.00816.85
8.0.110.0040.00416.97
8.0.100.0070.00016.90
8.0.90.0050.00317.02
8.0.80.0030.01317.02
8.0.70.0040.00416.85
8.0.60.0070.00017.04
8.0.50.0020.00517.03
8.0.30.0070.01217.09
8.0.20.0160.00417.40
8.0.10.0000.00716.98
8.0.00.0160.00716.76
7.4.330.0030.00315.00
7.4.320.0070.00016.56
7.4.300.0000.00616.35
7.4.290.0070.00016.48
7.4.280.0040.00416.50
7.4.270.0000.00716.60
7.4.260.0000.00716.43
7.4.250.0040.00416.47
7.4.240.0040.00316.56
7.4.230.0000.00716.53
7.4.220.0070.01116.54
7.4.210.0110.00416.70
7.4.200.0040.00416.50
7.4.160.0030.01316.40
7.4.150.0140.00317.40
7.4.140.0060.01117.86
7.4.130.0100.00616.52
7.4.120.0020.01716.42
7.4.110.0070.01116.61
7.4.100.0140.00316.48
7.4.90.0070.01316.52
7.4.80.0110.00819.39
7.4.70.0110.00616.64
7.4.60.0000.01716.48
7.4.50.0050.00316.45
7.4.40.0090.01216.72
7.4.30.0100.00616.34
7.4.00.0040.01415.04
7.3.330.0030.00513.42
7.3.320.0000.00813.39
7.3.310.0030.00316.39
7.3.300.0000.00716.29
7.3.290.0070.01116.42
7.3.280.0050.00916.41
7.3.270.0190.00317.40
7.3.260.0120.01016.41
7.3.250.0060.01016.56
7.3.240.0080.00816.30
7.3.230.0100.00616.64
7.3.210.0120.01116.57
7.3.200.0060.01319.39
7.3.190.0170.00016.63
7.3.180.0060.00916.53
7.3.170.0090.00616.41
7.3.160.0060.00916.45
7.3.10.0070.00716.59
7.3.00.0060.00616.60
7.2.330.0120.00516.60
7.2.320.0100.00616.68
7.2.310.0110.00716.55
7.2.300.0090.00816.61
7.2.290.0040.01216.64
7.2.130.0070.00717.12
7.2.120.0030.00717.16
7.2.110.0080.00716.76
7.2.100.0040.01116.84
7.2.90.0100.00017.04
7.2.80.0070.00716.93
7.2.70.0030.01316.98
7.2.60.0080.00416.97
7.2.50.0070.00717.05
7.2.40.0070.01017.09
7.2.30.0080.00416.80
7.2.20.0070.00716.96
7.2.10.0060.00617.02
7.2.00.0130.00317.04
7.1.250.0000.01415.65
7.1.200.0000.00915.91
7.1.70.0070.01017.30
7.1.60.0140.01119.40
7.1.50.0110.01416.65
7.1.00.0000.08022.46
7.0.200.0330.00314.71
7.0.140.0030.07322.01
7.0.60.0100.08319.95
7.0.50.0070.03717.85
7.0.40.0130.08020.40
7.0.30.0400.04320.34
7.0.20.0300.07320.19
7.0.10.0070.04320.20
7.0.00.0100.08720.15
5.6.280.0030.07320.96
5.6.210.0070.08020.67
5.6.200.0170.07018.25
5.6.190.0070.04320.63
5.6.180.0270.05320.57
5.6.170.0170.06020.47
5.6.160.0100.06320.56
5.6.150.0070.08318.27
5.6.140.0100.08018.19
5.6.130.0100.07318.15
5.6.120.0000.05020.98
5.6.110.0070.08321.11
5.6.100.0100.06021.02
5.6.90.0100.08720.96
5.6.80.0070.07720.38
5.5.350.0270.07020.35
5.5.340.0300.02717.96
5.5.330.0030.04320.29
5.5.320.0300.07720.35
5.5.310.0370.04020.36
5.5.300.0100.04718.03
5.5.290.0000.08717.92
5.5.280.0130.08020.65
5.5.270.0170.07320.76
5.5.260.0030.06320.75
5.5.250.0070.06720.58
5.5.240.0030.09020.26
5.4.450.0770.05719.55
5.4.440.0670.06319.66
5.4.430.0500.06719.20
5.4.420.0800.05719.64
5.4.410.0100.05318.92
5.4.400.0400.05018.68
5.4.390.0330.05718.84
5.4.380.0100.05718.49
5.4.370.0100.03318.72
5.4.360.0100.04318.72
5.4.350.0060.04112.01
5.4.340.0070.03412.01
5.4.320.0080.03412.50
5.4.310.0050.03912.49
5.4.300.0050.04112.50
5.4.290.0030.03912.49
5.4.280.0050.03412.39
5.4.270.0050.03612.39
5.4.260.0040.03912.39
5.4.250.0060.03712.39
5.4.240.0030.03912.39
5.4.230.0040.03912.38
5.4.220.0020.03912.38
5.4.210.0050.03612.38
5.4.200.0050.03912.38
5.4.190.0020.04512.38
5.4.180.0070.03412.38
5.4.170.0060.03512.39
5.4.160.0050.03612.39
5.4.150.0050.03712.38
5.4.140.0120.03112.07
5.4.130.0050.04012.06
5.4.120.0030.03712.01
5.4.110.0070.03312.01
5.4.100.0050.03512.01
5.4.90.0020.04012.01
5.4.80.0030.03912.01
5.4.70.0030.03712.00
5.4.60.0060.03412.00
5.4.50.0040.03612.00
5.4.40.0030.03611.99
5.4.30.0070.03311.99
5.4.20.0090.03211.99
5.4.10.0100.03311.98
5.4.00.0030.03811.48
5.3.290.0050.04012.80
5.3.280.0070.03612.71
5.3.270.0060.03912.72
5.3.260.0060.03912.72
5.3.250.0080.03612.72
5.3.240.0110.03312.71
5.3.230.0070.04112.71
5.3.220.0070.03612.68
5.3.210.0100.03512.68
5.3.200.0060.03712.68
5.3.190.0080.03612.68
5.3.180.0080.03512.68
5.3.170.0080.03512.67
5.3.160.0040.04212.67
5.3.150.0060.03712.67
5.3.140.0060.03512.66
5.3.130.0040.04012.66
5.3.120.0100.03512.66
5.3.110.0060.03812.66
5.3.100.0060.03712.12
5.3.90.0100.03512.09
5.3.80.0060.03512.09
5.3.70.0050.03612.08
5.3.60.0060.03912.07
5.3.50.0070.04712.02
5.3.40.0050.03812.02
5.3.30.0040.04411.98
5.3.20.0060.03511.75
5.3.10.0050.03611.72
5.3.00.0070.03511.71
5.2.170.0050.0309.21
5.2.160.0040.0319.21
5.2.150.0020.0339.21
5.2.140.0030.0319.21
5.2.130.0040.0289.17
5.2.120.0050.0279.17
5.2.110.0010.0329.18
5.2.100.0040.0299.17
5.2.90.0030.0319.18
5.2.80.0050.0299.17
5.2.70.0040.0309.17
5.2.60.0090.0339.12
5.2.50.0030.0349.09
5.2.40.0060.0319.07
5.2.30.0080.0289.05
5.2.20.0030.0309.04
5.2.10.0050.0288.94
5.2.00.0060.0318.80
5.1.60.0070.0278.08
5.1.50.0040.0258.07
5.1.40.0060.0348.06
5.1.30.0060.0308.41
5.1.20.0050.0268.43
5.1.10.0070.0238.15
5.1.00.0010.0298.16
5.0.50.0030.0216.65
5.0.40.0050.0186.50
5.0.30.0050.0296.32
5.0.20.0030.0206.29
5.0.10.0030.0206.26
5.0.00.0040.0306.26
4.4.90.0020.0164.78
4.4.80.0030.0144.76
4.4.70.0010.0174.75
4.4.60.0010.0174.75
4.4.50.0010.0174.77
4.4.40.0030.0244.71
4.4.30.0050.0134.76
4.4.20.0050.0214.84
4.4.10.0030.0154.85
4.4.00.0020.0254.76
4.3.110.0040.0144.67
4.3.100.0010.0164.66
4.3.90.0030.0144.63
4.3.80.0040.0234.58
4.3.70.0040.0134.63
4.3.60.0030.0144.63
4.3.50.0020.0164.63
4.3.40.0020.0244.53
4.3.30.0020.0163.30
4.3.20.0020.0163.28
4.3.10.0010.0173.24
4.3.00.0170.0177.13

preferences:
40.9 ms | 401 KiB | 5 Q