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 = mb_strpos( $target, $bad_char); var_dump( 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.0040.01116.63
8.3.50.0160.00522.88
8.3.40.0150.00618.84
8.3.30.0100.00319.04
8.3.20.0040.00420.21
8.3.10.0040.00423.64
8.3.00.0000.00819.25
8.2.180.0040.01118.29
8.2.170.0140.00322.96
8.2.160.0180.00020.47
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0020.00526.16
8.2.120.0050.00221.08
8.2.110.0040.00421.91
8.2.100.0110.00417.59
8.2.90.0000.00819.21
8.2.80.0040.00417.97
8.2.70.0050.00317.75
8.2.60.0040.00418.03
8.2.50.0080.00018.07
8.2.40.0080.00018.10
8.2.30.0030.00518.10
8.2.20.0050.00317.82
8.2.10.0040.00418.20
8.2.00.0060.00317.82
8.1.280.0080.00625.92
8.1.270.0080.00023.70
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0000.00823.85
8.1.230.0070.00419.20
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0070.00417.25
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0060.00318.65
8.1.160.0070.00021.90
8.1.150.0070.00018.79
8.1.140.0040.00417.43
8.1.130.0030.00317.76
8.1.120.0040.00417.38
8.1.110.0020.00517.43
8.1.100.0050.00317.50
8.1.90.0040.00317.46
8.1.80.0000.00717.43
8.1.70.0070.00017.49
8.1.60.0050.00317.72
8.1.50.0000.00817.64
8.1.40.0040.00417.62
8.1.30.0000.00817.74
8.1.20.0060.00317.66
8.1.10.0000.00717.56
8.1.00.0000.00917.63
8.0.300.0070.00018.77
8.0.290.0070.00016.88
8.0.280.0080.00018.45
8.0.270.0040.00417.21
8.0.260.0000.00617.34
8.0.250.0070.00017.01
8.0.240.0050.00217.13
8.0.230.0040.00416.94
8.0.220.0000.00717.06
8.0.210.0040.00417.00
8.0.200.0000.00616.99
8.0.190.0000.00817.05
8.0.180.0070.00016.96
8.0.170.0040.00417.13
8.0.160.0000.00717.02
8.0.150.0040.00716.91
8.0.140.0000.00716.83
8.0.130.0080.00013.46
8.0.120.0040.00417.02
8.0.110.0000.00817.04
8.0.100.0040.00416.99
8.0.90.0000.00717.10
8.0.80.0120.00917.04
8.0.70.0000.00717.03
8.0.60.0040.00417.03
8.0.50.0050.00317.02
8.0.30.0140.00617.19
8.0.20.0060.01217.41
8.0.10.0000.00717.16
8.0.00.0140.00816.95
7.4.330.0050.00015.00
7.4.320.0030.00316.55
7.4.300.0040.00416.54
7.4.290.0080.00016.61
7.4.280.0030.00416.57
7.4.270.0050.00316.55
7.4.260.0000.00716.50
7.4.250.0080.00016.48
7.4.240.0040.00316.57
7.4.230.0030.00416.65
7.4.220.0130.01016.46
7.4.210.0040.01616.64
7.4.200.0000.00716.61
7.4.160.0150.00916.65
7.4.150.0140.00617.40
7.4.140.0130.00617.86
7.4.130.0110.00816.55
7.4.120.0080.01016.64
7.4.110.0130.01016.55
7.4.100.0120.01116.44
7.4.90.0200.00316.57
7.4.80.0090.01519.39
7.4.70.0100.00716.39
7.4.60.0070.01016.55
7.4.50.0020.00216.66
7.4.40.0130.00316.52
7.4.30.0060.00916.70
7.4.00.0060.01214.91
7.3.330.0040.00413.41
7.3.320.0000.00613.36
7.3.310.0040.00416.43
7.3.300.0070.00016.27
7.3.290.0140.00016.43
7.3.280.0100.01016.40
7.3.270.0140.00317.40
7.3.260.0130.01016.45
7.3.250.0130.00316.66
7.3.240.0070.01016.34
7.3.230.0070.01016.39
7.3.210.0120.00616.46
7.3.200.0100.01219.39
7.3.190.0090.01316.56
7.3.180.0090.00616.36
7.3.170.0070.01416.64
7.3.160.0060.01216.40
7.3.10.0120.00316.62
7.3.00.0060.00716.66
7.2.330.0120.00416.88
7.2.320.0030.01316.49
7.2.310.0120.00316.66
7.2.300.0060.01216.75
7.2.290.0000.01516.60
7.2.130.0050.01016.75
7.2.120.0090.00616.93
7.2.110.0100.00616.87
7.2.100.0080.00616.86
7.2.90.0060.00616.99
7.2.80.0050.00616.95
7.2.70.0080.00516.97
7.2.60.0070.00516.94
7.2.50.0040.01017.02
7.2.40.0070.00616.89
7.2.30.0080.00716.89
7.2.20.0090.00716.89
7.2.10.0070.00616.74
7.2.00.0060.00917.63
7.1.250.0090.00515.67
7.1.240.0140.00715.72
7.1.230.0070.00715.57
7.1.220.0140.00315.64
7.1.210.0040.01115.72
7.1.200.0130.00315.67
7.1.190.0070.00715.67
7.1.180.0070.00715.46
7.1.170.0060.00615.96
7.1.160.0060.00615.94
7.1.150.0080.01215.99
7.1.140.0100.01015.94
7.1.130.0130.00415.53
7.1.120.0090.00915.76
7.1.110.0070.01015.74
7.1.100.0080.00917.01
7.1.90.0090.00616.00
7.1.80.0070.01115.87
7.1.70.0050.00616.33
7.1.60.0140.00717.46
7.1.50.0120.01016.02
7.1.40.0100.00315.64
7.1.30.0130.00315.75
7.1.20.0100.01015.77
7.1.10.0110.00715.62
7.1.00.0070.03919.10
7.0.330.0100.00015.23
7.0.320.0060.00615.41
7.0.310.0100.00315.45
7.0.300.0090.00415.32
7.0.290.0060.00615.40
7.0.280.0070.01015.23
7.0.270.0100.00715.41
7.0.260.0120.00615.29
7.0.250.0160.00015.42
7.0.240.0080.00815.17
7.0.230.0100.00615.10
7.0.220.0030.00915.54
7.0.210.0060.00615.09
7.0.200.0360.00915.00
7.0.190.0100.00315.11
7.0.180.0060.00615.39
7.0.170.0130.00615.44
7.0.160.0100.01015.15
7.0.150.0100.00315.36
7.0.140.0090.04018.72
7.0.130.0060.00915.20
7.0.120.0070.00715.27
7.0.110.0060.00915.49
7.0.100.0030.01315.09
7.0.90.0090.00615.24
7.0.80.0090.00915.41
7.0.70.0140.00315.42
7.0.60.0130.03017.62
7.0.50.0040.02516.52
7.0.40.0080.02816.60
7.0.30.0240.03716.89
7.0.20.0170.04816.69
7.0.10.0040.05316.77
7.0.00.0020.03316.84
5.6.380.0070.00714.63
5.6.370.0050.00914.50
5.6.360.0130.00314.61
5.6.350.0070.00714.23
5.6.340.0080.00714.36
5.6.330.0100.00514.49
5.6.320.0130.00514.04
5.6.310.0160.00414.13
5.6.300.0050.01014.38
5.6.290.0130.00814.25
5.6.280.0100.03617.58
5.6.270.0140.00414.38
5.6.260.0140.00714.66
5.6.250.0070.01014.26
5.6.240.0030.01914.63
5.6.230.0060.01014.06
5.6.220.0080.01114.39
5.6.210.0110.03817.57
5.6.200.0110.02816.25
5.6.190.0050.03017.31
5.6.180.0180.04617.54
5.6.170.0140.03917.50
5.6.160.0150.04117.28
5.6.150.0130.03616.28
5.6.140.0080.04516.26
5.6.130.0070.03516.21
5.6.120.0070.05017.41
5.6.110.0080.04117.64
5.6.100.0110.04017.72
5.6.90.0070.02217.74
5.6.80.0060.02417.38
5.6.70.0070.00414.07
5.6.60.0100.00314.48
5.6.50.0030.01014.06
5.6.40.0000.01114.07
5.6.30.0060.00614.17
5.6.20.0070.00713.91
5.6.10.0090.00614.25
5.6.00.0110.00414.11
5.5.380.0090.00710.99
5.5.370.0090.00111.23
5.5.360.0090.00410.86
5.5.350.0050.02215.77
5.5.340.0060.03114.53
5.5.330.0060.04815.73
5.5.320.0050.04915.67
5.5.310.0170.02215.70
5.5.300.0050.02314.75
5.5.290.0100.04014.73
5.5.280.0020.02416.11
5.5.270.0060.04615.98
5.5.260.0030.04516.10
5.5.250.0050.04315.89
5.5.240.0100.03215.77
5.5.230.0080.00011.24
5.5.220.0090.00311.26
5.5.210.0000.00811.27
5.5.200.0000.01211.20
5.5.190.0030.01010.95
5.5.180.0030.00311.45
5.5.170.0030.00611.38
5.5.160.0030.00310.95
5.5.150.0030.00311.33
5.5.140.0000.01111.29
5.5.130.0060.00611.22
5.5.120.0000.01311.21
5.5.110.0000.01110.63
5.5.100.0000.00811.17
5.5.90.0040.00711.04
5.5.80.0000.00810.91
5.5.70.0040.00711.29
5.5.60.0070.00711.27
5.5.50.0030.01010.77
5.5.40.0030.00310.83
5.5.30.0060.00310.64
5.5.20.0120.00011.16
5.5.10.0000.01111.34
5.5.00.0060.00311.01
5.4.450.0890.02615.07
5.4.440.0540.03215.15
5.4.430.0100.03115.27
5.4.420.0100.02715.24
5.4.410.0100.03815.06
5.4.400.0050.03215.09
5.4.390.0100.02514.86
5.4.380.0120.03515.04
5.4.370.0050.02814.85
5.4.360.0110.02214.91
5.4.350.0060.02411.59
5.4.340.0070.02511.65
5.4.330.0040.00411.06
5.4.320.0020.02511.85
5.4.310.0080.02111.75
5.4.300.0040.02811.93
5.4.290.0040.02311.67
5.4.280.0050.01811.60
5.4.270.0050.01911.79
5.4.260.0040.02411.64
5.4.250.0020.02211.86
5.4.240.0080.01811.79
5.4.230.0080.01811.80
5.4.220.0050.02111.74
5.4.210.0060.01911.76
5.4.200.0020.02411.77
5.4.190.0030.02411.83
5.4.180.0040.02311.65
5.4.170.0020.02411.82
5.4.160.0050.02111.69
5.4.150.0060.02011.79
5.4.140.0050.02311.60
5.4.130.0050.02211.69
5.4.120.0040.02011.43
5.4.110.0040.03111.32
5.4.100.0050.02011.47
5.4.90.0050.02311.41
5.4.80.0050.02511.60
5.4.70.0040.02211.40
5.4.60.0050.02911.56
5.4.50.0080.02611.36
5.4.40.0050.02411.55
5.4.30.0020.02111.47
5.4.20.0070.01911.54
5.4.10.0030.02211.46
5.4.00.0040.02611.10
5.3.290.0020.02511.68
5.3.280.0050.02011.61
5.3.270.0060.02211.70
5.3.260.0080.02011.71
5.3.250.0030.02411.62
5.3.240.0040.02311.64
5.3.230.0040.02211.69
5.3.220.0040.02411.64
5.3.210.0080.02011.64
5.3.200.0050.02111.65
5.3.190.0050.02211.64
5.3.180.0050.02311.70
5.3.170.0040.02711.59
5.3.160.0050.02211.67
5.3.150.0060.01911.64
5.3.140.0020.02511.63
5.3.130.0040.02411.59
5.3.120.0030.02211.63
5.3.110.0080.02311.60
5.3.100.0020.02511.39
5.3.90.0070.02511.37
5.3.80.0060.02311.30
5.3.70.0060.02011.30
5.3.60.0060.02011.35
5.3.50.0050.02411.31
5.3.40.0060.02111.26
5.3.30.0040.02211.29
5.3.20.0020.02211.13
5.3.10.0020.02511.12
5.3.00.0070.02311.11
5.2.170.0040.0199.86
5.2.160.0070.0159.86
5.2.150.0040.0249.86
5.2.140.0050.0229.86
5.2.130.0070.0239.84
5.2.120.0030.0209.84
5.2.110.0040.0169.84
5.2.100.0080.0139.84
5.2.90.0060.0149.84
5.2.80.0060.0179.84
5.2.70.0060.0209.84
5.2.60.0060.0149.81
5.2.50.0050.0169.80
5.2.40.0070.0229.79
5.2.30.0060.0209.78
5.2.20.0040.0259.77
5.2.10.0040.0169.72
5.2.00.0070.0219.66
5.1.60.0040.0129.30
5.1.50.0050.0149.29
5.1.40.0030.0199.29
5.1.30.0060.0199.46
5.1.20.0050.0219.47
5.1.10.0030.0179.33
5.1.00.0020.0159.33
5.0.50.0070.0098.58
5.0.40.0020.0128.51
5.0.30.0050.0178.42
5.0.20.0060.0098.40
5.0.10.0040.0138.38
5.0.00.0030.0178.38
4.4.90.0000.0127.65
4.4.80.0020.0107.63
4.4.70.0040.0117.63
4.4.60.0020.0137.63
4.4.50.0020.0137.64
4.4.40.0060.0157.61
4.4.30.0030.0097.64
4.4.20.0010.0107.68
4.4.10.0010.0107.68
4.4.00.0020.0147.64
4.3.110.0020.0107.59
4.3.100.0010.0107.59
4.3.90.0010.0137.57
4.3.80.0040.0187.54
4.3.70.0040.0127.57
4.3.60.0030.0117.57
4.3.50.0030.0097.57
4.3.40.0030.0137.52
4.3.30.0030.0106.91
4.3.20.0020.0096.90
4.3.10.0030.0096.88
4.3.00.0240.01313.27

preferences:
42.54 ms | 401 KiB | 5 Q