On 18/02/15 12:33, François Laupretre wrote:
>> Octal is something that can often be miss converted since it IS the same
>> > as an integer with only a '0' in front in PHP. But that is not something
>> > that can be fixed with the current proposals?
> What do you propose ? Considering leading zero as octal indicator is not an 
> option, IMO. If you have another way, why not.

0o 0 and \ are the usual flags for an octal value and we have functions
for octal strings but they are not user friendly in their output as they
tend to ignore adding a leading tag at all. But my favourite is still
'\143\141\164' == "\143\141\164" which is false, but I doubt many would
know why?
Yes it only becomes a problem when one is accessing material like
historic data dumps, and rejecting the numeric string may be 'strictly'
correct, but it's one those 'what the' if one gets an error where for
years it's run perfectly?

>> > Again we have to ensure
>> > that the pre-processing takes care of the problem and how would static
>> > analysis even know there was a problem? A type hint following the SQL
>> > standards.
> Please give conversion rules and supported syntax for the 'SQL' type you have 
> in mind.
'octal' just expects a base 8 string. I know there are some examples in
the SQL standards, but since they are paid for documents it's pointless
trying to reference them :(

( Andrey - there may not be plans to support a full range of hints -
weak or strict, but this is all valid material that PHP handles daily
and passes around )

-- 
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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to