3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($input) { $output = htmlspecialchars($input, ENT_QUOTES, 'UTF-8'); $code = str_replace('%', '\\x', rawurlencode($input)); if (validate_utf8($input)) { echo "【{$output}】({$code}) は有効なUTF-8シーケンスです。\n"; } else { echo "({$code}) は無効なUTF-8シーケンスです。\n"; } } test("☝( ◠‿◠ )☝"); test("ゔ〲〰"); test("\x0a\x92\xff"); // てきとー test("\xef\xbb\xbf"); // BOMだっけ test(""); // 空文字列 echo "\n"; test("\x2f"); // スラッシュ(1バイト) test("\xc0\xaf"); // スラッシュ(冗長2バイト) test("\xe0\x80\xaf"); // スラッシュ(冗長3バイト) test("\xf0\x80\x80\xaf"); // スラッシュ(冗長4バイト)
based on oXOEL

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0060.00916.61
7.3.00.0090.00316.66
7.2.130.0070.01017.00
7.2.120.0080.00816.81
7.2.110.0080.01016.67
7.2.100.0210.00716.70
7.2.90.0080.01116.56
7.2.80.0080.00916.62
7.2.70.0080.00816.81
7.2.60.0050.00916.73
7.2.50.0220.00216.96
7.2.40.0090.00616.93
7.2.30.0120.01016.77
7.2.20.0170.00316.82
7.2.10.0120.00616.88
7.2.00.0170.00317.56
7.1.250.0040.00715.68
7.1.230.0100.00515.89
7.1.220.0130.00315.40
7.1.210.0160.00315.75
7.1.200.0150.00315.30
7.1.190.0180.01415.66
7.1.180.0050.01115.41
7.1.170.0110.00715.49
7.1.160.0160.00415.77
7.1.150.0110.00915.55
7.1.140.0250.00615.88
7.1.130.0140.00615.77
7.1.120.0120.00615.50
7.1.110.0070.01115.64
7.1.100.0070.01016.92
7.1.90.0130.00515.71
7.1.80.0130.00315.49
7.1.70.0040.00816.38
7.1.60.0110.00917.58
7.1.50.0080.01316.46
7.1.40.0190.00015.84
7.1.30.0110.00515.78
7.1.20.0150.00615.93
7.1.10.0070.01015.55
7.1.00.0050.04219.00
7.0.310.0070.01015.42
7.0.300.0140.00315.38
7.0.290.0100.00514.98
7.0.280.0040.01115.30
7.0.270.0250.00315.29
7.0.260.0100.00415.21
7.0.250.0180.00715.48
7.0.240.0060.00915.46
7.0.230.0110.00415.46
7.0.220.0180.00415.39
7.0.210.0150.00315.61
7.0.200.0070.00715.88
7.0.190.0130.00315.29
7.0.180.0100.00715.32
7.0.170.0090.00515.54
7.0.160.0160.00315.39
7.0.150.0150.00015.47
7.0.140.0030.01315.25
7.0.130.0040.00815.52
7.0.120.0160.00315.55
7.0.110.0980.00615.57
7.0.100.0100.00715.49
7.0.90.0080.00415.14
7.0.80.0200.00315.21
7.0.70.0180.00515.43
7.0.60.0090.04218.50
7.0.50.0110.04816.80
7.0.40.0120.04416.73
7.0.30.0220.03616.82
7.0.20.0170.04416.87
7.0.10.0070.04216.66
7.0.00.0090.04416.87
hhvm-3.22.00.1570.10790.97
hhvm-3.21.30.1070.13690.93
hhvm-3.21.00.0620.14190.66
hhvm-3.20.20.0670.12390.18
hhvm-3.19.20.0750.14590.17
hhvm-3.18.50.1100.15389.50
hhvm-3.18.40.0830.10989.07
hhvm-3.17.30.0940.10488.05
hhvm-3.15.40.0670.11386.05
hhvm-3.13.20.1030.14197.11
hhvm-3.12.140.0800.11695.96
hhvm-3.11.10.0950.12888.41
hhvm-3.10.10.0820.11984.93
5.6.380.0140.00214.22
5.6.370.0030.01014.05
5.6.360.0140.00314.48
5.6.350.0130.00413.76
5.6.340.0110.00813.98
5.6.330.0080.00814.40
5.6.320.0180.00013.83
5.6.310.0080.00813.86
5.6.300.0030.01314.42
5.6.290.0090.00614.15
5.6.280.0070.02317.70
5.6.270.0130.00414.51
5.6.260.0080.00514.40
5.6.250.0090.00614.45
5.6.240.0140.00314.09
5.6.230.0100.00714.20
5.6.220.0180.00014.35
5.6.210.0080.04217.47
5.6.200.0110.03516.15
5.6.190.0090.03717.52
5.6.180.0160.02217.36
5.6.170.0190.02217.36
5.6.160.0120.01817.41
5.6.150.0060.02116.21
5.6.140.0070.03916.32
5.6.130.0050.03116.31
5.6.120.0080.03817.54
5.6.110.0090.02217.51
5.6.100.0160.03717.57
5.6.90.0150.02417.61
5.6.80.0080.04717.14
5.6.70.0070.00714.11
5.6.60.0080.00813.96
5.6.50.0130.00614.06
5.6.40.0100.01014.05
5.6.30.0140.00014.07
5.6.20.0110.00813.80
5.6.10.0090.00914.01
5.6.00.0090.00514.12
5.5.380.0040.00812.79
5.5.370.0050.00512.79
5.5.360.0110.00012.79
5.5.350.2170.02016.59
5.5.340.0020.02415.37
5.5.330.0100.03716.46
5.5.320.0360.03316.53
5.5.310.0120.02516.51
5.5.300.0100.02515.37
5.5.290.0010.03515.44
5.5.280.0040.02316.77
5.5.270.0020.04016.73
5.5.260.0070.02216.84
5.5.250.0110.03516.79
5.5.240.0110.02516.53
5.5.230.0050.01012.79
5.5.220.0080.00512.79
5.5.210.0060.00612.79
5.5.200.0090.00612.79
5.5.190.0060.00612.79
5.5.180.0130.00312.79
5.5.170.0100.00714.19
5.5.160.0100.00312.79
5.5.150.0070.00712.79
5.5.140.0030.00812.79
5.5.130.0080.00612.79
5.5.120.0040.01212.79
5.5.110.0040.00912.79
5.5.100.0110.00412.79
5.5.90.0080.00812.79
5.5.80.0150.00012.79
5.5.70.0130.00012.79
5.5.60.0080.00412.79
5.5.50.0000.01212.79
5.5.40.0070.00312.79
5.5.30.0080.00412.79
5.5.20.0140.00012.79
5.5.10.0050.00512.79
5.5.00.0000.01412.79
5.4.450.0600.05319.56
5.4.440.0400.06319.62
5.4.430.0670.07019.46
5.4.420.0500.06019.35
5.4.410.0830.04019.39
5.4.400.0700.05019.29
5.4.390.0730.05319.10
5.4.380.0570.05719.29
5.4.370.0700.05319.20
5.4.360.0700.05719.21
5.4.350.0530.05319.21
5.4.340.0530.05719.29
5.4.320.0770.05018.95
5.4.310.0670.05019.09
5.4.300.0600.05719.16
5.4.290.0530.06019.18
5.4.280.0630.05019.28
5.4.270.0630.05018.95
5.4.260.0570.05019.23
5.4.250.0700.04019.17
5.4.240.0530.05719.28
5.4.230.0530.05319.05
5.4.220.0530.05719.11
5.4.210.0570.05319.08
5.4.200.0570.05319.22
5.4.190.0630.04319.16
5.4.180.0670.04319.12
5.4.170.0900.07019.08
5.4.160.0570.05018.83
5.4.150.0570.05719.10
5.4.140.0700.05016.30
5.4.130.0770.05016.30
5.4.120.0630.05716.27
5.4.110.0700.05016.51
5.3.290.0700.05314.70
5.3.280.0700.04014.51
5.3.270.0630.04714.61
5.3.260.0600.05314.55
5.3.250.0900.06714.55
5.3.240.0600.06014.71
5.3.230.0770.04314.52
5.3.220.0530.05314.48
5.3.210.0630.06314.53