3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "abbacbzcz"; $array = str_split($string); $array = array_count_values($array); $array = array_filter($array, function($val) { return $val == 1;}); $first_non_repeated_letter = key(array_shift($array)); var_export($first_non_repeated_letter);
Output for rfc.property-hooks, git.master, git.master_jit
Fatal error: Uncaught TypeError: key(): Argument #1 ($array) must be of type array, null given in /in/aM73X:8 Stack trace: #0 /in/aM73X(8): key(NULL) #1 {main} thrown in /in/aM73X on line 8
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:
49.62 ms | 1275 KiB | 4 Q