PHP7 Scalar type declarations

PHP7 Improved performance up to twice as fast as PHP 5.6 ,Consistent 64-bit support,Combined comparison Operator (<=>),scalar type declarations any many others new features.Here we know how to use scalar type declaration in PHP7.There are two flavor for scalar type declaration such as coercive (default) and strict.

  1. strings
  2. integers
  3. floating-point
  4. booleans

Those four types of parameter can now bind on parameter in PHP7.Other types introduced in PHP 5

Let see an example how to use that.

PHP7 Scalar type declarations