3v4l.org

run code in 300+ PHP versions simultaneously
<?php $files = [ 'Hakim_123.txt', 'Mick_MacKusa.jpg', 'henry_rollins.gif', 'Z_zzz_zzz_zzz.csv' ]; $_GET['postname'] = 'H'; if (!preg_match('~^[A-Z]$~', $_GET['postname'] ?? '')) { exit('Stop trying to hack my scripts'); } exit( json_encode( array_values( array_unique( preg_filter( '~^' . strtolower($_GET['postname']) . '[^_]*\K_.*~', '', array_map('strtolower', $files) ) ) ) ) );

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
225.72 ms | 2120 KiB | 15 Q