public static string gettype(PhpValue variable) { // works well on references: return PhpVariable.GetTypeName(variable); }