Re: what PHP really needs

From: Date: Sat, 24 Jan 2004 03:14:33 +0000
Subject: Re: what PHP really needs
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-175611@lists.php.net to get a copy of this message
Chris Boget wrote:
I'm not really sure and am possibly wayyyy off base but...cant something like this also be done by using "global" for variables?
No, not really. That wouldn't be accessable by all users, which, as it turns out, is what the OP had asked for. Chris Like someone else mentioned using PHP's shared memory functions would get you close.
I prefer to use something like Turck MMCache to cache the compiled php script rather than using shared memory. PHP not making variables accessible to all instances is a feature a lot of people depend on, very few PHP programmers seem to unset variables when they are done with them unfortunately If you are wanting to cache information consider serialize like others have said, there is very little PHP doesn't already do, if you are having a problem attack it from another angle because it is most likely you have not designed the best solution to the problem. It is always best to define the problem before deciding on a solution. Jason

« previous php.general (#175611) next »