Other types

  • iterable - represents the iterable pseudo-type. Like arrays, iterables can have type parameters e.g. iterable<string, Foo>, and a purity in brackets, what iterating over them may do: iterable[pure]<string, Foo> accepts arrays and Traversable[pure]<string, Foo> (see Iterators and generators).
  • void - can be used in a return type when a function does not return a value.
  • resource represents a PHP resource.
  • closed-resource represents a PHP resource that was closed (using fclose or another closing function).