3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = array( "Sample" => array( "context" => '我叫王豪' ) ); $encoded = json_encode($json); var_dump($encoded); $unescaped = preg_replace_callback('/\\\u(\w{4})/', function ($matches) { return html_entity_decode('&#x' . $matches[1] . ';', ENT_COMPAT, 'UTF-8'); }, $encoded); var_dump($unescaped);
Output for git.master, git.master_jit, rfc.property-hooks
string(49) "{"Sample":{"context":"\u6211\u53eb\u738b\u8c6a"}}" string(37) "{"Sample":{"context":"我叫王豪"}}"

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