3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ords_to_unistr($ords, $encoding = 'UTF-8'){ // Turns an array of ordinal values into a string of unicode characters $str = ''; for($i = 0; $i < sizeof($ords); $i++){ // Pack this number into a 4-byte string // (Or multiple one-byte strings, depending on context.) $v = $ords[$i]; $str .= pack("N",$v); } $str = mb_convert_encoding($str,$encoding,"UCS-4BE"); return($str); } echo ords_to_unistr(array(239));
Output for git.master, git.master_jit, rfc.property-hooks
ï

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:
49.44 ms | 401 KiB | 8 Q