3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ':username:' => 'John Doe' ]; foreach($array as $sel) { // $sel's name === ':username:'. // how can I get the name, and not the value? }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
149.2 ms | 2084 KiB | 8 Q