3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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);
based on Dm4RW
Output for 5.1.0 - 7.2.6
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) ""
Output for 5.0.0 - 5.0.5
bool(true) int(1) Warning: Entity: line 1: parser error : Char 0xD841 out of allowed range in /in/2s9uo on line 7 Warning: <?xml version="1.0" encoding="utf-8"?><foo>��</foo> in /in/2s9uo on line 7 Warning: ^ in /in/2s9uo on line 7 Warning: Entity: line 1: parser error : PCDATA invalid Char value 55361 in /in/2s9uo on line 7 Warning: <?xml version="1.0" encoding="utf-8"?><foo>��</foo> in /in/2s9uo on line 7 Warning: ^ in /in/2s9uo on line 7 Warning: Entity: line 1: parser error : Char 0xDF4F out of allowed range in /in/2s9uo on line 7 Warning: <?xml version="1.0" encoding="utf-8"?><foo>��</foo> in /in/2s9uo on line 7 Warning: ^ in /in/2s9uo on line 7 Warning: Entity: line 1: parser error : PCDATA invalid Char value 57167 in /in/2s9uo on line 7 Warning: <?xml version="1.0" encoding="utf-8"?><foo>��</foo> in /in/2s9uo on line 7 Warning: ^ in /in/2s9uo on line 7 bool(false) string(0) ""
Output for 4.4.5 - 4.4.9
bool(true) int(1) Fatal error: Call to undefined function: simplexml_load_string() in /in/2s9uo on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
bool(true) int(1) Fatal error: Call to undefined function: simplexml_load_string() in /in/2s9uo on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
bool(true) int(1) Fatal error: Call to undefined function: simplexml_load_string() in /in/2s9uo on line 7