Author: techfox9
php introduction notes.. part 3..
Wednesday, July 2nd, 2008 @ 12:36 am
From
http://www.ibm.com/developerworks/web/library/wa-phprock3/
Variable references
<?php
$name = ‘Amol’;
$nom = &$name; // $nom is now a reference to $name
$nom .= ‘ Hatwar’;
print(“Are you $name?\n”); // Jimmy Ray parody?
?>
Static variables
function funcCount()
{
static $count = 0;
return $count++;
}
Dynamic function calls
function say_hi()
{
print(“Hi! “);
}
$my_func = ‘say_hi’;
$my_func();