Thursday, January 1, 2009

PHP 5.3 Data Structures - A chance for web frameworks

A few days ago Johannes Schlüter did a blogpost about Datastructures which will be introduced in PHP5.3 via the SPL extension. He also talks about the new type SplFixedArray which only uses numeric indexes. Web Frameworks like symfony can benefit from Datastructures because in many places of the code arrays are used to organize information. These informations (like routing tables, class path tables, etc.) can be stored in types that fit to the needs of the information structure which gives a wanted limitation in my opinion. But more important is the boost in performance because these types are developed in C and not in userland code. Also these new types only have to care about what they are intended to do. As an example SplFixedArray can work much faster because it only has to care about indexes as numerics. Maybe the core team will use these new types and we'll see them in one of the coming versions of symfony or another Web Framework.

No comments:

Post a Comment