Menu

← Back to all error identifiers

Error Identifiers: cast.*

There are 9 error identifiers in the cast.* group:

  • Expression cannot be meaningfully cast to bool.
  • Deprecated cast syntax like (integer), (boolean), or (double) is used.
  • Expression cannot be cast to float.
  • Expression cannot be cast to int.
  • Expression cannot be cast to string.
  • cast.unset non-ignorable
    Removed (unset) cast is used on PHP 8.0 or later.
  • cast.useless phpstan-strict-rules
    Value is cast to the type it already has, making the cast redundant.
  • cast.void non-ignorable
    The (void) cast is used inside an expression instead of as a standalone statement.
  • cast.voidNotSupported non-ignorable
    The (void) cast is not supported on the configured PHP version.
Theme
A
© 2026 PHPStan s.r.o.