3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "credit_card": { "cvc": "123", "expiry": { "month": "12", "year": "2019" }, "name": "Julian", "number": "5123450000000008", "token": null }, "amount": "10", "currency": "AUD", "gateway": { "line_of_business": "eWallet", "service": "default", "username": null }, "external_id": "my external id", "reference": "julian test", "remitter_name": null, "request_id": "1529561070", "statement_description": null, "security_id": null }'; $array = json_decode($json, true); function test_print($item, $key, &$array) { if ($item === null) unset($array[$key]); } array_walk_recursive($array, 'test_print'); var_dump($array);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function test_print(), 2 passed and exactly 3 expected in /in/qmP09:31 Stack trace: #0 [internal function]: test_print('123', 'cvc') #1 /in/qmP09(36): array_walk_recursive(Array, 'test_print') #2 {main} thrown in /in/qmP09 on line 31
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:
60.9 ms | 401 KiB | 8 Q