public static function tokenString($string) { switch (mb_strtolower($string)) { case 'false': return T_FALSE; case 'true': return T_TRUE; case 'null': return T_NULL; case 'self': return T_SELF; case 'parent': return T_PARENT; default: return T_STRING; } }