array_filter preserve keys

Run Settings
LanguagePHP
Language Version
Run Command
<?php $a = ["foo", "bar"]; $b = array_filter($a, function($item) { return $item[0] == "f"; }); $c = array_filter($a, function($item) { return $item[0] == "b"; }); echo json_encode($a, JSON_PRETTY_PRINT); echo "\n\n"; echo json_encode($b, JSON_PRETTY_PRINT); echo "\n\n"; echo json_encode($c, JSON_PRETTY_PRINT);
Editor Settings
Theme
Key bindings
Full width
Lines