3v4l.org

run code in 300+ PHP versions simultaneously
<?php $User = array( 'Name' => "Hans-Peterµµ", 'Contacts' => array(1, 2, 3, 4, 5, 6, 7, 42), 'Seen' => array(array('UserID' => 2, 'Timestamp' => 5046), array('UserID' => 3, 'Timestamp' => 789456)), 'Active' => 1 ); $J = html_entity_decode(json_encode(array_utf8_encode($User))); die($J); function array_utf8_encode($Array) { foreach($Array as &$Val) { if(is_array($Val)) { $Val = array_utf8_encode($Val); } elseif(is_string($Val)) { $Val = mb_convert_encoding(htmlentities($Val), 'UTF-8'); } } return $Array; }
Output for git.master, git.master_jit, rfc.property-hooks
{"Name":"Hans-Peterµµ","Contacts":[1,2,3,4,5,6,7,42],"Seen":[{"UserID":2,"Timestamp":5046},{"UserID":3,"Timestamp":789456}],"Active":1}

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