3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump((bool)preg_match('//u', "\xf0\x90\x8c\xbc")); var_dump(preg_match('/[\xf0-\xf7][\x90-\xbf][\x80-\xbf][\x80-\xbf]/', "\xf0\x90\x8c\xbc")); $xml = '<?xml version="1.0" encoding="utf-8"?>' . "<foo>\xed\xa1\x81\xed\xbd\x8f</foo>"; $parsed = simplexml_load_string($xml); var_dump($parsed); var_dump((string)$parsed);
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) int(1) Warning: simplexml_load_string(): Entity: line 1: parser error : Char 0xD841 out of allowed range in /in/2s9uo on line 7 Warning: simplexml_load_string(): <?xml version="1.0" encoding="utf-8"?><foo>��</foo> in /in/2s9uo on line 7 Warning: simplexml_load_string(): ^ in /in/2s9uo on line 7 Warning: simplexml_load_string(): Entity: line 1: parser error : PCDATA invalid Char value 55361 in /in/2s9uo on line 7 Warning: simplexml_load_string(): <?xml version="1.0" encoding="utf-8"?><foo>��</foo> in /in/2s9uo on line 7 Warning: simplexml_load_string(): ^ in /in/2s9uo on line 7 Warning: simplexml_load_string(): Entity: line 1: parser error : Char 0xDF4F out of allowed range in /in/2s9uo on line 7 Warning: simplexml_load_string(): <?xml version="1.0" encoding="utf-8"?><foo>��</foo> in /in/2s9uo on line 7 Warning: simplexml_load_string(): ^ in /in/2s9uo on line 7 Warning: simplexml_load_string(): Entity: line 1: parser error : PCDATA invalid Char value 57167 in /in/2s9uo on line 7 Warning: simplexml_load_string(): <?xml version="1.0" encoding="utf-8"?><foo>��</foo> in /in/2s9uo on line 7 Warning: simplexml_load_string(): ^ in /in/2s9uo on line 7 bool(false) string(0) ""

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:
57.37 ms | 404 KiB | 8 Q