May as well do something practical while I am testing ...
http://php7.lsces.org.uk/wiki/view/The+good+old+days+...+annotation+without+overheads
First thing to pick up ... PHP7 is a good 20% faster than the current
PHP5.6.5 but I'm seeing no speed difference between 5.6.5 and 5.4.20, so
as long as can leapfrog the remaining PHP5.x builds then all of the time
upgrading TO 5.4 is not a waste.
But the main reason for posting this was the recent comments that strict
types has nothing to do with annotation. It was EVERYTHING to do with
annotation and project design. Every value I pass to the verify function
has to be validated for much more than just integer or string, so how do
I pass the correct information for this single function.
content_id would have been a 32bit integer in the 90's, but the upgrade
of SQL sequences to 64bit has changed that. user id's are still 32bit
integers, and create and edit are timestamps which are another
contentious area when trying to work cross database. Mine are 32bit day
- 32bit time, so a pair of current integers, but stored as a 64bit value
in the database. title is a 250 character string, and while ip is v4 at
present v6 needs to be catered for in PHP7. I see nowhere here that a
few limited strict tags provides any help, but every value passed
currently will need additional code if the integer checking becomes an
unconstrained object.
Much has been made of adding a class string to handle all the extra
unicode processing, but I am now thinking that a properly exposed string
and integer class which has the ability to assign constraint checks does
make sense. Then use of an integer value on a 32bit platform can error
when the actual value is too big for the target use. THAT is what strict
type checking is about!
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
Hi Lester,
Much has been made of adding a class string to handle all the extra
unicode processing, but I am now thinking that a properly exposed string
and integer class which has the ability to assign constraint checks does
make sense. Then use of an integer value on a 32bit platform can error
when the actual value is too big for the target use. THAT is what strict
type checking is about!
Scalar may have object capability.
https://wiki.php.net/rfc/autoboxing
IIRC, this wasn't popular, but people's mind may change as time goes by.
It does not cover your requirement, but it may be extended the way it does.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net