3v4l.org

run code in 300+ PHP versions simultaneously
<?php $X = '{"a":"a","b":"b","c":"c","d":"d","e":"e","f":"f9","g":"g2","h":"h1"}'; print_r((fn()=>array_keys(json_decode($X,1)))()); print_r((fn()=>array_values(json_decode($X,1)))());

preferences:
23.29 ms | 414 KiB | 15 Q