DEV Community

Discussion on: Learn by Doing: Practice PHP OOP (level 3)

Collapse
 
johnbetong profile image
John Betong

Why not use the following PHP features?

  1. strict_types // file wide and ensures type is correct otherwise throws errors
  2. set error_reporting(-1); // applies to all include/required files - max error reporting
  3. ini_set('display_errors', 'TRUE'); applies to all include/required files - show errors on screen
  4. declare function parameter types
  5. declare function parameter result type

If the above is not used then you might as well go back to using PHP 4 :)

Also enhances the chances of using JIT Compilation which will no doubt not tolerate "lazy type juggling"