View Single Post
Old 01-27-2008, 03:15 PM   #1 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Bug When was the last time you used the global construct?

If you remember, the global construct allows you to bring in variables to use in a function that didn't declare them. Like so:

php Code:
$iX = 2;
$iY = 3;

function multiply()
{
    global $iX, $iY;
    return $iX * $iY;
}

echo 'Total: ' . multiply();

However, I really cannot remember the last time I used that in any of my scripts - thanks to OOP! How about everybody else?
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote