3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file_name="abc.txt"; $file_extension = end(explode('.', $file_name));

preferences:
11.96 ms | 408 KiB | 5 Q