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 #179273 is a reply to message #179272] Thu, 27 September 2012 18:07 Go to previous messageGo to previous message
Christoph Becker is currently offline  Christoph Becker
Messages: 91
Registered: June 2012
Karma:
Member
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

--
Christoph M. Becker
[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: Sat Nov 09 17:19:59 GMT 2024

Total time taken to generate the page: 0.04350 seconds