3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $filenameOld = 'PX20170713_103320_2651093_00001'; var_dump(implode(array_slice(explode('_', rtrim(basename($filenameOld), ".xml" )), 0, 2)));
based on NHOTU
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
string(16) "PX20170713103320"