3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array('0' => 'A_VALUE'); foreach ($data as $key => $value) { if ($key == "Something to match the key on") { print_r($key); print_r('key matches'); } }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
154.24 ms | 2931 KiB | 9 Q