PHP Classes

A yay and a no

Recommend this page to a friend!

      PHP Classes blog  >  PHP 7 Scalar Type Hin...  >  All threads  >  A yay and a no  >  (Un) Subscribe thread alerts  
Subject:A yay and a no
Summary:Declare? Why? Strong typing! Yes!
Messages:2
Author:Rafael den Heijer
Date:2015-03-24 09:07:39
Update:2015-03-24 13:48:43
 

  1. A yay and a no   Reply   Report abuse  
Picture of Rafael den Heijer Rafael den Heijer - 2015-03-24 13:00:17
Why does php defer so much from it's normal model of declaring things (e.g. error_reporting(E_ALL)) and now introduces something that seems totally illogical (assignment in declaration)? I hope this is only while devving version 7 and is replaced by something more sane later on...

Aside from that, I'm totally in favour strong-typing... I like php a lot, been devving professionally for about 9 years now, but always missed type hinting for datatype/scalars... But also introducing it for return values totally surpassed my expectations... ;)

  2. Re: A yay and a no   Reply   Report abuse  
Picture of Joseluis Laso Joseluis Laso - 2015-03-24 13:48:43 - In reply to message 1 from Rafael den Heijer
Hello Rafael,

Thank you for your comments.

I find very weird the declaration of strict_types too.