3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = ['test' => 'test', 'test2'=>'another test', 'test3' => 'third test']; $address = ['test' => 'test', 'test2'=>'another test', 'test3' => 'third test diff', 'test4' => 'ignore me bro']; $changes = array_filter($original, function ($key, $data) use ($address) { return $data === $address->getData($key); }, ARRAY_FILTER_USE_BOTH); var_dump($changes);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to a member function getData() on array in /in/9vLKU:8 Stack trace: #0 [internal function]: {closure}('test', 'test') #1 /in/9vLKU(7): array_filter(Array, Object(Closure), 1) #2 {main} thrown in /in/9vLKU on line 8
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:
52.26 ms | 401 KiB | 8 Q