Advertisement

Type Hinting

  • Mikael Olsson
Chapter

Abstract

PHP relies on the proper documentation of functions for developers to know what arguments a function can take. To simplify this PHP 5 introduced type hinting, which allows a function to specify the type of arguments it accepts. Allowed types include classes, interfaces and the pseudo types array and callable.

Keywords

Function Signature Callable Function Scalar Type Language Construct Type Array 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Mikael Olsson 2013

Authors and Affiliations

  • Mikael Olsson
    • 1
  1. 1.AlandFinland

Personalised recommendations