3v4l.org

run code in 300+ PHP versions simultaneously
<?php $images = ['what.jpeg', 'hey.jpg']; foreach ($images as $image) { $lookup[pathinfo($image, PATHINFO_FILENAME)] = $image; } var_export($lookup);

preferences:
33.21 ms | 405 KiB | 5 Q