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; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function utf_encode() in /in/HoZDV:24 Stack trace: #0 /in/HoZDV(21): utf('"') #1 /in/HoZDV(5): utf(Array) #2 {main} thrown in /in/HoZDV on line 24
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.4 ms | 401 KiB | 8 Q