|
Posted by Dotan Cohen on 09/29/65 11:10
On Wed, 9 Mar 2005 15:11:11 -0800 (PST), Richard Lynch <ceo@l-i-e.com> wrote:
> Any newbie could RTFM and not "get" that when you see:
> bool arsort ( array &array [, int sort_flags] )
>
> the "bool" up front tells you that the function returns a boolean
> (true/false) value.
>
> That should in the future be an important fact to note.
>
> Another thing to watch for is the & in the docs.
>
> That generally means that the function is going to *CHANGE* the value you
> pass in, in some way, and you can't rely on it being the same as what you
> handed off to the function.
>
> In the case of arsort, that's exactly what you want, of course.
>
> In other cases, it might mean that you need to only give the function a
> *COPY* of the data, so you can keep your copy safe and un-altered.
>
> These are all consistent usage throughout the manual, so you might as well
> get used to them.
>
> More info about this is buried here:
> http://us4.php.net/manual/en/about.prototypes.php
>
> in Appendix Q, way the hell at the end of the manual...
>
Thank you very much for this info! I RTFM and STFA while I SMFB
(anyone care to guess what that is?) often, but have never gone
through Appendix Q. I very much appreciate that bit of insight, I am
sure that will save me a post sometime or later. Maybe someone (me?)
should consider writing a newbie-guide to TFM, with tips such as this.
Any one else has a tip that I should include?
Dotan Cohen
http://English-Lyrics.com
http://Song-Lyriks.com
Navigation:
[Reply to this message]
|