3v4l.org

run code in 300+ PHP versions simultaneously
<?php $desc = '{"a":1, "b":2}'; $ob = '{"a":1, "b":2, "c":3}'; function isLikeThis(string $description, string $tested) { $args = array_map(function($arg){ get_object_vars(json_decode()); }, func_get_args()); return !(bool)call_user_func_array('array_diff_assoc', $args); } var_dump(isLikeThis($desc, $ob));
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: json_decode() expects at least 1 argument, 0 given in /in/fR3lm:7 Stack trace: #0 /in/fR3lm(7): json_decode() #1 [internal function]: {closure}('{"a":1, "b":2}') #2 /in/fR3lm(6): array_map(Object(Closure), Array) #3 /in/fR3lm(12): isLikeThis('{"a":1, "b":2}', '{"a":1, "b":2, ...') #4 {main} thrown in /in/fR3lm on line 7
Process exited with code 255.

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