Extract extension from file name

Return extension of a given file (either name or full path).

php
fork add to bundle source
function file_extension($file_path) { return pathinfo($file_path, PATHINFO_EXTENSION); }

usage

load_function('file_extension'); echo file_extension('/tmp/log.txt'); // txt
← how to use this in app?
create log ...inout