PHP Classes / Type Hint Class

Implement type hinting support for base PHP types

Type Hint Class PHP Class

This package implements the support for type hinting that works with PHP base data types. It works by replacing the current PHP error handler that performs enhanced type checking of the types of parameters when functions are called. Several classes are provided to perform type checking of parameters of base types: boolean, float, integer, string, resource, callable. There are additional classes for strict type checking of float and string values. These classes do not accept values of other types that could be promoted to types: integer float or string. When the replacement error handler catches a recoverable error that corresponds to type checking mismatch, it checks the function declaration and calls the type checking class correspondent to the expected type of the parameter that triggered the error.

Similar PHP Classes

Search in PHP Classes

Filter by tags