3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(function_exists("json_encode"); { $table = get_html_translation_table(HTML_ENTITIES); $table = utf($table); echo json_encode(get_html_translation_table(HTML_ENTITIES)); } function is_utf($string) { return preg_match('%(?:[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})+%xs', $string); } function utf($yolo) { if(is_array($yolo)) { $result = array(); foreach($yolo as $yo => $lo) $result[utf($yo)] = utf($lo); } elseif(is_string($yolo) && !is_utf($yolo)) $result = utf_encode($yolo); else $result = $yolo; return $result; }

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)
5.4.300.0090.06512.49
5.4.290.0060.04012.49
5.4.280.0070.03912.39
5.4.270.0110.05512.39
5.4.260.0110.04912.39
5.4.250.0230.11312.39
5.4.240.0170.12512.39
5.4.230.0100.05312.38
5.4.220.0160.09512.38
5.4.210.0170.08212.38
5.4.200.0140.06912.38
5.4.190.0140.08012.38
5.4.180.0120.09512.38
5.4.170.0110.06712.38
5.4.160.0100.04312.38
5.4.150.0090.06512.38
5.4.140.0080.05212.07
5.4.130.0170.06712.05
5.4.120.0140.05912.01
5.4.110.0130.06012.01
5.4.100.0120.06412.01
5.4.90.0100.05312.01
5.4.80.0100.05312.01
5.4.70.0200.08812.00
5.4.60.0040.05312.00
5.4.50.0100.05212.00
5.4.40.0120.07312.00
5.4.30.0090.06411.99
5.4.20.0040.03911.99
5.4.10.0180.07111.99
5.4.00.0180.09511.48
5.3.280.0130.10012.71
5.3.270.0160.07212.73
5.3.260.0120.06812.72
5.3.250.0220.10312.72
5.3.240.0190.09112.72
5.3.230.0140.06812.71
5.3.220.0100.05512.68
5.3.210.0080.06212.68
5.3.200.0050.05612.68
5.3.190.0110.08112.67
5.3.180.0080.06512.68
5.3.170.0120.06012.67
5.3.160.0110.06312.68
5.3.150.0130.05612.67
5.3.140.0130.04412.66
5.3.130.0100.05512.65
5.3.120.0190.06312.66
5.3.110.0130.07312.65
5.3.100.0140.08312.11
5.3.90.0210.09012.09
5.3.80.0090.08712.07
5.3.70.0110.05112.08
5.3.60.0160.06112.06
5.3.50.0080.06412.00
5.3.40.0130.06512.00
5.3.30.0120.07311.95
5.3.20.0080.04911.73
5.3.10.0070.06511.70
5.3.00.0250.11211.68

preferences:
136.21 ms | 1394 KiB | 7 Q