- substr: documentation ( source)
- array_map: documentation ( source)
- var_dump: documentation ( source)
- strrpos: documentation ( source)
<?php
$tests = ['derp.php', 'test.php'];
array_map(function($test) {
return substr($test, 0, strrpos($test, '.'));
}, $tests);
var_dump($tests);