On 16/10/15 01:45, Andrea Faulds wrote: > But why should we change the documentation anyway? We've used void for a > very long time, at least 17 years[0]. We don't just use it in the PHP > manual, it's also used in docblocks and the PHP source code's function > prototypes. It's the commonly-accepted, widely-used term. Until now this > was uncontroversial.
This are in my book is just the same as 'NULL'. Different styles of working have different views on how things are interpreted. The function sets for arrays as originally designed simply modified the target object without returning any error code or similar value. The 'more modern' way of doing this may be perhaps to 'return' the array? Or perhaps a count of the number of elements moved - 0 indicates that nothing has changed. I can see the reason you want the run time engine to flag an error if I do $res = sort(xxx); but like many of the 'checks' that seem to be bloating the run time code, I still see that as a function for a good IDE rather than a run time error. void is just a documentational flag that CURRENTLY there is nothing to return, but does not prevent a modified version that may return a value at some point in the future. What is 'controversial' is a change from the freedom of the user to create code the way they want to work, which may wrap a void function in a return check simply because at some point in the future they plan to upgrade the simple off the shelf function call with something which generates the return. I find enforced typing in the same bucket since while some returns may clearly be 'integer' in other cases a later development might use the fractional part for some other purpose. Others seem to think that is bad practice? Having now two different styles of working is something we simply now have to put up with, but loading the bias even more in the direction of 'I think that you are wrong' needs to have a very good case? -- 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