Actually php does not require hard variable declarations like C ++. Therefore, I set the error settings hard, so as not to forget to declare variables, but is there such a parameter in php.ini that all undeclared variables would set a value for example false?

  • Null not satisfied? - zb '
  • in general, if you think about it then do so (for dev mode): ideone.com/vGULRF - zb '26

2 answers 2

error_reporting (E_ALL) - the most optimal and convenient option

    falsa is quite a definite boolean value. A null is a special type.

    The easiest way to check and assign false is with the?: Operator: