3v4l.org

run code in 300+ PHP versions simultaneously
<?php function guzzle_json_decode($json, $assoc = false, $depth = 512, $options = 0) { $data = \json_decode($json, $assoc, $depth, $options); if (JSON_ERROR_NONE !== json_last_error()) { throw new \InvalidArgumentException( 'json_decode error: ' . json_last_error_msg() ); } return $data; } $json = json_encode(""); var_dump($json); var_dump(guzzle_json_decode("\"\"", true)); var_dump(json_last_error());
Output for git.master_jit, git.master, rfc.property-hooks
string(2) """" string(0) "" int(0)

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