3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['key1' => 5, 'key2' => 17]; $array = array_filter($array, function ($value, $key) { return !!preg_match('/^key\d$/', $key); })
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected end of file in /in/2va3C on line 7
Process exited with code 255.

preferences:
274.77 ms | 1395 KiB | 24 Q