3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function unicode2utf8($c) { $output=""; if($c < 0x80) { return chr($c); } else if($c < 0x800) { return chr( 0xc0 | ($c >> 6) ).chr( 0x80 | ($c & 0x3f) ); } else if($c < 0x10000) { return chr( 0xe0 | ($c >> 12) ).chr( 0x80 | (($c >> 6) & 0x3f) ).chr( 0x80 | ($c & 0x3f) ); } else if($c < 0x200000) { return chr(0xf0 | ($c >> 18)).chr(0x80 | (($c >> 12) & 0x3f)).chr(0x80 | (($c >> 6) & 0x3f)).chr(0x80 | ($c & 0x3f)); } return false; } echo unicode2utf8("http\u00253A\u00252F\u00252Fwww.splicecommunity.com\u00252Fmedia\u00252F5735709\u00252Fadbne_hero-1.jpg")
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/huWEq on line 26
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end, expecting ',' or ';' in /in/huWEq on line 26
Process exited with code 255.