Because of the new automatic resource deallocation, resources don't need to be freed within the script, since they are freed as soon as they are deallocated. This is similar to Java's garbage collection. Note that PHP 3.0 will also free resources automatically, but not until after the script is finished processing. New syntax changes include support for a foreach loop. Pointers can now be implemented allowing two variables to represent the same variable.
New output buffering allows developers to abort a page after processing has begun.
This simplifies proper error handling in scripts. The Roadmap In March of this year, a closed beta was released to PHP developers and a handful of other sponsors. The first public beta of PHP 4.0 was released in July, followed by Beta 2 in August. Feedback from the first beta release was very positive. The remaining work is checking all the PHP modules to make sure they're PHP 4.0-compatible.