On 11/03/15 09:05, wp12173047-156224 wp12173047-156224 wrote:
>>> BTW, the current PHP silent behavior should be considered even more
>>> > > confusing otherwise we
>>> > > wouldn't have these measurements:
>>> > > 
>>> > > https://wiki.php.net/rfc/strict_argcount#bc_breaks_on_the_real_world
>> > 
>> > I'm not sure how these prove current behavior is "confusing". Yes, there
>> > are bugs in the code, and I'm sure this feature will expose some of
>> > those (previously harmless) bugs. At cost of the BC break. And don't
>> > think a handful of libraries represent the vast universe of PHP code,
>> > most of which we can't even see because it's not published anywhere.
> What do you mean here?
> 
> Again, introducing a warning isn't a real BC-break and as you says there are
> bugs it helps nobody ignoring them. If you think so you can do that with all 
> of
> your own bugs by ignoring warnings/notices.

I must say I was a little confused when I first saw this given the
number of errors I got when addressing the E_STRICT ones on existing
code. One ended up creating multiple functions with different arguments
to get a clean set of code, but I had perhaps not even realised that
adding extra arguments was not flagged. In practice my IDE setup is
flagging warnings where variables are not used, and it seems that
perhaps I'm in a 'safe place' because of the whole package rather than a
particular 'bug' in PHP.

Most of the examples being shown are examples of simple bad programming
practice that needs fixing anyway, and I would expect a proper code
review to have picked them up, so don't see that adding the check in PHP
is essential. It would however be a useful addition but in the E_STRICT
category ... not that I want to maintain that, but being able to ignore
those errors until such time as it is appropriate to fix them. The
poorly checked code is the problem rather than PHP here, and I'm with
Stas that it's probably being a bit heavy handed at this point in the
PHP7 process. Actually I would be rather annoyed if the problems
demonstrated have not already been cleaned up already? A tool to
identify problems and get them cleaned before the main test is switched
on helps everybody?

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