FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Count how many times a value occurs in an array
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Count how many times a value occurs in an array [message #179274 is a reply to message #179273] Thu, 27 September 2012 21:52 Go to previous messageGo to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
Am 27.09.2012 20:07, schrieb Christoph Becker:
> M. Strobel wrote:
>> Be careful with call-by-reference, it is not allowed in the newest PHP versions.
>
> Only the call-time call-by-reference was deprecated in 5.3 and removed
> in 5.4. Declaring a parameter of a function as reference is absolutely
> fine.
>
> E.g.:
>
> function increase(&$n)
> {
> $n++;
> }
>
> $i = 1; increase($i); // $i == 2
> $i = 1; increase(&$i); // fatal error in PHP 5.4
>

Yes, but I had a problem with callback functions: if you created them with
create_function this was a call-time call-by-reference.


/Str.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Only Allow exec in CLI
Next Topic: Re: FEDEX Shipping
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 09:34:08 GMT 2024

Total time taken to generate the page: 0.04686 seconds