3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace work; class Test1 {} $a = (object)[]; $b = new \stdClass(); $data = [$a, $b, new Test1()]; $result = json_encode($data); var_dump($result); echo str_repeat('-', 100) . PHP_EOL; $result1 = json_decode($result); $result2 = json_decode($result, true); $result1_1 = json_encode($result1); $result2_1 = json_encode($result2); var_dump($result1_1, $result2_1);
Output for git.master, git.master_jit, rfc.property-hooks
string(10) "[{},{},{}]" ---------------------------------------------------------------------------------------------------- string(10) "[{},{},{}]" string(10) "[[],[],[]]"

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:
50.23 ms | 405 KiB | 5 Q