PHP Type Checking

Functions used for type checking can be found under this tag category.

  1. Tutorial showing how to check if a variable is a number in PHP
  2. How to check if a variable is of the string type in PHP.
  3. Strict mode can be enabled to enforce type hinting for scalar types; strict mode can be enabled with a declare directive at the top of your index.php, ans will also apply to included files.

Type Checking in PHP

Tutorials discussing type checking in PHP will be listed in this category.

Find out how to validate the different data types in PHP with the tutorials in this category.

Validating types can be done using the is_[type] functions.

Usually you do not need to validate data types, but in some cases it may improve consistency to do so.

Links

  1. Types Introduction - php.net