3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v = json_decode('[{"id":"1","name":"Jack","username":"Jack1","age":"23"}]'); echo 'Normal:' . \PHP_EOL; echo json_encode($v) . \PHP_EOL . \PHP_EOL; echo 'Force Object and Numeric Check:' . \PHP_EOL; echo json_encode($v, JSON_FORCE_OBJECT | JSON_NUMERIC_CHECK). \PHP_EOL . \PHP_EOL; echo 'Normal reset:' . \PHP_EOL; echo json_encode(reset($v)) . \PHP_EOL . \PHP_EOL; echo 'Force Object and Numeric Check reset:' . \PHP_EOL; echo json_encode(reset($v), JSON_FORCE_OBJECT | JSON_NUMERIC_CHECK);
Output for git.master, git.master_jit, rfc.property-hooks
Normal: [{"id":"1","name":"Jack","username":"Jack1","age":"23"}] Force Object and Numeric Check: {"0":{"id":1,"name":"Jack","username":"Jack1","age":23}} Normal reset: {"id":"1","name":"Jack","username":"Jack1","age":"23"} Force Object and Numeric Check reset: {"id":1,"name":"Jack","username":"Jack1","age":23}

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:
30.53 ms | 406 KiB | 5 Q