StopType WIP
finished get_type implementation
fixed tests
fixed php5.3 compat