3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'index1' => 'Deleted', 'index2' => 'numbers', 'index3' => 'test', 'index4' => 'Inserted', ); $specificIndex = array('index1', 'index3'); $array1 = array_diff_key($array, array_flip($specificIndex)); $array2 = array_diff($array, $array1); var_dump($array1, $array2);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { ["index2"]=> string(7) "numbers" ["index4"]=> string(8) "Inserted" } array(2) { ["index1"]=> string(7) "Deleted" ["index3"]=> string(4) "test" }

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