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']; }, $array1); $array2 = (array_count_values($array)); print_r($array2);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $array1 in /in/sXo4h on line 19 Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /in/sXo4h:17 Stack trace: #0 /in/sXo4h(17): array_map(Object(Closure), NULL) #1 {main} thrown in /in/sXo4h on line 17
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:
48.69 ms | 401 KiB | 8 Q