3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hoge = array(5,5,3,2,1,3); $hogehoge = array_map(function($arg){ if(array_values($arg)>1){ return $arg; } },array_count_values($hoge)); var_dump($hogehoge);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: array_values(): Argument #1 ($array) must be of type array, int given in /in/RMj2B:4 Stack trace: #0 /in/RMj2B(4): array_values(2) #1 [internal function]: {closure}(2) #2 /in/RMj2B(3): array_map(Object(Closure), Array) #3 {main} thrown in /in/RMj2B on line 4
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:
40.63 ms | 401 KiB | 8 Q