start with PHP replacement for awk/cut/head/tail