3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, "apples",2, "oranges",3, "plums"); // array_filter() $filtered = array_filter( $array, "ctype_alpha"); $nu = array_map( "strtoupper", $filtered); // array_walk $f = function(&$item,$key,$prefix) { $item = "$key: $prefix: $item"; }; array_walk($nu, $f,"fruit"); var_dump($nu); ?>

preferences:
25.73 ms | 407 KiB | 5 Q