3v4l.org

run code in 300+ PHP versions simultaneously
<?php $element = array( 0 => array( 'name' => 'test', 'email' => 'aaa@example.com' ), 1 => array( 'name' => 'testing', 'email' => 'aaa@example.com' ), 1 => array( 'name' => 'Jane Doe', 'email' => 'asd@example.com' )); $array = array_map(function($element) { return $element['name']; }, $element); $array2 = (array_count_values($array)); print_r($array2);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [test] => 1 [Jane Doe] => 1 )

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:
36.46 ms | 401 KiB | 8 Q