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