Zend Engine 2 alpha
14th June 2002
I don’t know how I missed this, but the PHP group have released an alpha version of PHP with the Zend Engine 2 (tarball / Windows binary). This is exciting stuff—the new scripting engine has vastly improved object support and brand new exception handling, something I’ve wanted in PHP for a long time. The CHANGELOG lists the new features and provides sample code. Here’s a summary:
- New Object Model—objects are dealt with by reference and no longer copied every time they are assigned or passed to a method.
- Private Members—classes can have private members, specified with the new
private
keyword. - Object Cloning—via a new
__clone()
method. - Forced deletion of objects—via the new
delete
statement. - Nested classes (namespaces)
- Unified Constructors—constriuctors can now be declared as
__construct()
rather than using the name of the class. - Destructors—specified with
__destruct()
. - Exceptions—including
try
,throw
andcatch
blocks. - Dereferencing objects returned from functions—now you can use code like this:
('bar')->method();
- Static member variables of static classes can now be initialized.
- Parameters that are passed by reference to a function may now have default values.
- Built-In Backtracing—the
debug_backtrace()
returns an array of previously called functions, along with their file and line number.
It’s all good, but it comes with a hefty warning against using the alpha on even semi-production web sites. Personally I can’t wait for a deployable version.
More recent articles
- Weeknotes: Llama 3, AI for Data Journalism, llm-evals and datasette-secrets - 23rd April 2024
- Options for accessing Llama 3 from the terminal using LLM - 22nd April 2024
- AI for Data Journalism: demonstrating what we can do with this stuff right now - 17th April 2024
- Three major LLM releases in 24 hours (plus weeknotes) - 10th April 2024
- Building files-to-prompt entirely using Claude 3 Opus - 8th April 2024
- Running OCR against PDFs and images directly in your browser - 30th March 2024
- llm cmd undo last git commit - a new plugin for LLM - 26th March 2024
- Building and testing C extensions for SQLite with ChatGPT Code Interpreter - 23rd March 2024
- Claude and ChatGPT for ad-hoc sidequests - 22nd March 2024
- Weeknotes: the aftermath of NICAR - 16th March 2024