[PHP] Scoping?

2008-07-28 Thread joshua harr
I'm new to php. My understanding of php scoping in v5 is that within a file there are only two scopes, main and in function. Why doesn't this work? --- $err = original value; $page = htmlfont color=\red\ {$err} /fontSome more HTML/html; if(something) { $err = this error; // $err

[PHP] Scoping?

2008-07-28 Thread joshua harr
Never mind. Gotta lay off the dumb juice.

[PHP] Scoping functions in PHP

2002-04-09 Thread Eric Starr
I am a Java programmer learning PHP. In Java you can have a class that contains public and private functions. Only the public functions are accessible outside of the class. Does PHP have a way to hide functions within a class (i.e. make the private)? My concern is that there are some

[PHP] scoping: can someone explain to me if this should/should not work?

2001-09-26 Thread Doug Farmer
The following code seems to work in general but everyone once in a while I'm getting a segmentation fault. Can someone explain to me why this would be intermittent and/or whether or not it should work? function getDomain($serverName) { $result = $serverName; // some processing to