3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_unique_array($array) { $result = array_map("unserialize", array_unique(array_map("serialize", $array))); foreach ($result as $key => $value) { if ( is_array($value) ) { $result[$key] = get_unique_array($value); } } return $result; } $array = array( array('id' => '123', 'dddd' => 'dd'), array('id' => '123', 'dddd' => 'dd'), array('id' => '111', 'dddd' => 'dd') ); $rr = super_unique($array); echo '<pre>'; print_r($rr);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function super_unique() in /in/d31Bs:24 Stack trace: #0 {main} thrown in /in/d31Bs on line 24
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:
43.29 ms | 401 KiB | 8 Q