3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const AB♥ = "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.0090.01216.63
8.3.50.0170.00522.76
8.3.40.0070.00718.83
8.3.30.0070.01119.08
8.3.20.0000.00720.25
8.3.10.0000.00823.68
8.3.00.0080.00019.25
8.2.180.0140.00418.17
8.2.170.0070.01022.96
8.2.160.0110.00420.28
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0140.00426.16
8.2.120.0040.00420.70
8.2.110.0070.00321.12
8.2.100.0090.00317.91
8.2.90.0050.00318.09
8.2.80.0090.00019.40
8.2.70.0040.00417.63
8.2.60.0000.00817.63
8.2.50.0000.00817.63
8.2.40.0060.00317.75
8.2.30.0040.00418.15
8.2.20.0050.00217.64
8.2.10.0050.00218.11
8.2.00.0000.00717.67
8.1.280.0140.00725.92
8.1.270.0060.00323.61
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0130.00020.52
8.1.230.0090.00521.06
8.1.220.0000.00817.78
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0000.00718.94
8.1.160.0060.00321.94
8.1.150.0040.00418.89
8.1.140.0040.00417.47
8.1.130.0030.00317.76
8.1.120.0040.00417.48
8.1.110.0000.00817.46
8.1.100.0070.00017.43
8.1.90.0040.00417.36
8.1.80.0050.00217.52
8.1.70.0000.00717.42
8.1.60.0030.00617.59
8.1.50.0060.00317.45
8.1.40.0000.00917.60
8.1.30.0050.00317.66
8.1.20.0000.00817.55
8.1.10.0000.00817.71
8.1.00.0080.00017.61
8.0.300.0050.00220.06
8.0.290.0000.00716.88
8.0.280.0040.00418.40
8.0.270.0030.00317.36
8.0.260.0000.00617.39
8.0.250.0040.00417.06
8.0.240.0030.00317.07
8.0.230.0030.00316.94
8.0.220.0070.00016.91
8.0.210.0000.00716.92
8.0.200.0030.00317.12
8.0.190.0000.00917.16
8.0.180.0030.00316.96
8.0.170.0030.00516.96
8.0.160.0040.00417.02
8.0.150.0000.00916.95
8.0.140.0000.00717.01
8.0.130.0040.00413.51
8.0.120.0050.00316.97
8.0.110.0000.00716.96
8.0.100.0000.00817.07
8.0.90.0040.00416.91
8.0.80.0060.00916.98
8.0.70.0040.00417.04
8.0.60.0000.00817.06
8.0.50.0050.00216.88
8.0.30.0100.01017.19
8.0.20.0110.01017.40
8.0.10.0080.00016.91
8.0.00.0100.00816.67
7.4.330.0060.00015.14
7.4.320.0070.00016.42
7.4.300.0060.00016.44
7.4.290.0030.00316.52
7.4.280.0000.00816.42
7.4.270.0000.00716.65
7.4.260.0000.00716.47
7.4.250.0000.00816.54
7.4.240.0030.00316.51
7.4.230.0000.00716.55
7.4.220.0090.00916.70
7.4.210.0070.00716.40
7.4.200.0000.00716.68
7.4.160.0060.01016.46
7.4.150.0090.01217.40
7.4.140.0130.00817.86
7.4.130.0090.00816.57
7.4.120.0070.01216.40
7.4.110.0090.01316.45
7.4.100.0100.00716.40
7.4.90.0030.01516.54
7.4.80.0080.00919.39
7.4.70.0110.00616.66
7.4.60.0130.00316.45
7.4.50.0060.00016.38
7.4.40.0000.01716.55
7.4.30.0080.00816.40
7.4.00.0040.01114.87
7.3.330.0030.00513.39
7.3.320.0070.00013.27
7.3.310.0040.00416.44
7.3.300.0030.00316.37
7.3.290.0070.00716.40
7.3.280.0130.00416.40
7.3.270.0070.01017.40
7.3.260.0150.00716.65
7.3.250.0180.00116.49
7.3.240.0070.01016.55
7.3.230.0080.00816.58
7.3.210.0150.00916.48
7.3.200.0080.00819.39
7.3.190.0150.00716.38
7.3.180.0030.01316.47
7.3.170.0070.01016.59
7.3.160.0050.01016.34
7.3.10.0030.01016.57
7.3.00.0060.00316.45
7.2.330.0130.01016.86
7.2.320.0100.00716.64
7.2.310.0070.01016.52
7.2.300.0070.01416.86
7.2.290.0070.01016.52
7.2.130.0030.01216.80
7.2.120.0040.00416.91
7.2.110.0000.01516.83
7.2.100.0030.00616.79
7.2.90.0000.01416.79
7.2.80.0000.01416.57
7.2.70.0060.01017.04
7.2.60.0090.00016.65
7.2.50.0040.01116.71
7.2.40.0060.00616.95
7.2.30.0040.00917.11
7.2.20.0070.01017.06
7.2.10.0030.00616.78
7.2.00.0080.00718.09
7.1.250.0070.00315.43
7.1.100.0000.01218.30
7.1.70.0040.00417.22
7.1.60.0040.01819.40
7.1.50.0070.01016.65
7.1.00.0070.07322.24
7.0.200.0330.00014.63
7.0.140.0070.07021.96
7.0.60.0030.08319.95
7.0.50.0070.04017.84
7.0.40.0070.09020.24
7.0.30.0200.04020.26
7.0.20.0400.06720.33
7.0.10.0030.09320.05
7.0.00.0000.05020.09
5.6.280.0030.07320.93
5.6.210.0030.07720.54
5.6.200.0130.07718.19
5.6.190.0070.06020.64
5.6.180.0300.07020.43
5.6.170.0370.06720.48
5.6.160.0070.05320.39
5.6.150.0070.05018.12
5.6.140.0030.06318.18
5.6.130.0130.07318.25
5.6.120.0030.07021.05
5.6.110.0070.04021.11
5.6.100.0000.04721.07
5.6.90.0100.06720.98
5.6.80.0030.08020.40
5.5.350.0100.04320.44
5.5.340.0030.03717.92
5.5.330.0030.08020.29
5.5.320.0370.06320.25
5.5.310.0270.03320.24
5.5.300.0030.05718.04
5.5.290.0070.08018.01
5.5.280.0100.04320.82
5.5.270.0130.07720.76
5.5.260.0070.08020.73
5.5.250.0170.06720.47
5.5.240.0030.07720.26
5.4.450.0230.06719.55
5.4.440.0230.07319.51
5.4.430.0270.04319.31
5.4.420.0300.06019.36
5.4.410.0270.07319.18
5.4.400.0470.02719.09
5.4.390.0230.07318.91
5.4.380.0270.05319.13
5.4.370.0330.06019.24
5.4.360.0230.07718.85
5.4.350.0230.05319.09
5.4.340.0230.05019.07
5.4.320.0270.06019.00
5.4.310.0300.07319.09
5.4.300.0230.07019.31
5.4.290.0130.04318.94
5.4.280.0100.07319.30
5.4.270.0270.06319.16
5.4.260.0300.03319.13
5.4.250.0270.07019.16
5.4.240.0200.04719.08
5.4.230.0170.04718.98
5.4.220.0200.07318.84
5.4.210.0200.05019.14
5.4.200.0200.07318.98
5.4.190.0130.04018.93
5.4.180.0200.04718.96
5.4.170.0200.07319.21
5.4.160.0230.07718.85
5.4.150.0170.07719.24
5.4.140.0230.06716.39
5.4.130.0300.06016.50
5.4.120.0170.05716.66
5.4.110.0300.06716.40
5.4.100.0200.07316.54
5.4.90.0300.06016.45
5.4.80.0170.05016.39
5.4.70.0170.05716.46
5.4.60.0200.04716.24
5.4.50.0200.04016.34
5.4.40.0270.05016.51
5.4.30.0270.03716.42
5.4.20.0330.05316.53
5.4.10.0130.04016.32
5.4.00.0170.04015.76
5.3.290.0270.07014.88
5.3.280.0200.07014.75
5.3.270.0230.07314.57
5.3.260.0270.06014.75
5.3.250.0230.06014.59
5.3.240.0200.04014.76
5.3.230.0230.07014.68
5.3.220.0270.04714.55
5.3.210.0230.07014.47
5.3.200.0230.07014.68
5.3.190.0200.07014.45
5.3.180.0230.06314.64
5.3.170.0200.05014.46
5.3.160.0130.05014.57
5.3.150.0130.05014.63
5.3.140.0230.06714.52
5.3.130.0330.03014.55
5.3.120.0170.07714.56
5.3.110.0130.05014.62
5.3.100.0200.07014.11
5.3.90.0200.06314.13
5.3.80.0200.03713.92
5.3.70.0200.04014.25
5.3.60.0230.05713.90
5.3.50.0200.04013.95
5.3.40.0270.03713.96
5.3.30.0170.05713.92
5.3.20.0130.03713.61
5.3.10.0230.05013.73
5.3.00.0170.04713.56
5.2.170.0270.06012.20
5.2.160.0330.02312.20
5.2.150.0270.03712.20
5.2.140.0200.03312.20
5.2.130.0130.06312.20
5.2.120.0100.04712.20
5.2.110.0170.05012.20
5.2.100.0100.03312.20
5.2.90.0130.03012.20
5.2.80.0200.02312.20
5.2.70.0200.03712.20
5.2.60.0130.04712.20
5.2.50.0100.03312.20
5.2.40.0230.05012.20
5.2.30.0170.05012.20
5.2.20.0170.05712.20
5.2.10.0230.04712.20
5.2.00.0230.05312.20
5.1.60.0170.05712.20
5.1.50.0130.03712.20
5.1.40.0200.04712.20
5.1.30.0170.04312.20
5.1.20.0330.03712.20
5.1.10.0170.05312.20
5.1.00.0300.04312.20
5.0.50.0000.02712.20
5.0.40.0070.03312.20
5.0.30.0100.05012.20
5.0.20.0100.04012.20
5.0.10.0100.03312.20
5.0.00.0070.04012.20
4.4.90.0070.01312.20
4.4.80.0100.01712.20
4.4.70.0070.03712.20
4.4.60.0100.03012.20
4.4.50.0070.03312.20
4.4.40.0070.05312.20
4.4.30.0070.02312.20
4.4.20.0100.03312.20
4.4.10.0100.02312.20
4.4.00.0000.04712.20
4.3.110.0070.04012.20
4.3.100.0100.02312.20
4.3.90.0130.03012.20
4.3.80.0100.05012.20
4.3.70.0100.01712.20
4.3.60.0100.03712.20
4.3.50.0130.01712.20
4.3.40.0070.05012.20
4.3.30.0070.01712.20
4.3.20.0030.02012.20
4.3.10.0070.02312.20
4.3.00.0030.02012.20

preferences:
44.93 ms | 401 KiB | 5 Q