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($arg)); }, 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 TypeError: array_diff_assoc(): Argument #1 ($array) must be of type array, null given in /in/l9CdP:11 Stack trace: #0 /in/l9CdP(11): array_diff_assoc(NULL, NULL) #1 /in/l9CdP(13): isLikeThis('{"a":1, "b":2}', '{"a":1, "b":2, ...') #2 {main} thrown in /in/l9CdP on line 11
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:
67.49 ms | 401 KiB | 8 Q