Hi! > I think nowadays it is well known that by-reference passing is to be > avoided and I don't see it particularly commonly in user code. By-reference
I don't think it's true. It depends on the style of coding, of course, but there are many situations where the most convenient solution is by-ref passing, mostly when single function can change more than one thing. Of course there are ways around it, but they are less convenient and less intuitive. Additionally, if you want a function to do some mutation with arrays, there's only two ways of doing it - either returning the resulting array (which can double the data) or pass by-ref. Again, there are ways around it, but again they are less convenient. And, if your own argument recognizes internal functions have legitimate reasons to use references, the same comes for user functions too - they could implement similar functionality. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php