Re: [RFC] Simplified Array API for extensions

From: Date: Wed, 03 Apr 2013 16:50:09 +0000
Subject: Re: [RFC] Simplified Array API for extensions
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-66919@lists.php.net to get a copy of this message
> I would like to kill other APIs in next major as well, time for > cleanup and ease maintenance. Yes, it is a bit more work for > extensions developers but as you plan to do pecl releases as well for > these inlined functions, that should be a good thing in the long run. > I'm not sure how you plan to kill the other APIs since these wrappers depend on them. Also, the engine uses them heavily for... everything. > What do you think about having the same for hashes? Many > implementations do not work with zval but with hash tables as well, > that would be a perfect combination :) > One of the implementation details which this API hides is the fact that zend_hash_find() returns a zval** which is usually just an annoyance to an extension developer, but can be taken advantage of for rewriting array contents (lookup a value and replace in via *ppzval = pzval; ) Not to mention the quick_* variants which CVs and the default class handlers make heavy use of, but are overkill for the average one-off access from an ext function. -Sara

« previous php.internals (#66919) next »