Re: I wrote an extension: yajl-php
| From: | Ruslan Osmanov | Date: | Wed, 09 Jan 2013 13:49:23 +0000 |
| Subject: | Re: I wrote an extension: yajl-php | ||
| References: | 1 2 3 4 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-10197@lists.php.net to get a copy of this message | ||
On 01/09/2013 06:51 PM, Johannes Schlüter wrote:
On Wed, 2013-01-09 at 16:23 +0500, Ruslan Osmanov wrote:Thanks. I'll keep going with resources then :) -- Regards, Ruslan Osmanov http://osmanov-dev-notes.blogspot.com | @ruslan_osmanovOn 01/09/2013 04:19 PM, Johannes Schlüter wrote:* You are using resources, that is fine while we tend to use objects instead.That's interesting. Is it better to use class objects instead of resources? I'm implementing event extension wrapping libevent. It will export around 7 resource types.For a large part it is an API choice, many people write object-oriented code and like that ;-)Should I rather make classes? I also guess resources should be a bit faster. It is vital for event(libevent).I don't have any benchmark on that level and there are many things influencing this, but the internal storage for all resources is a linked list, the object storage is an array. johannes