News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHP 10.0 Blog:
Kill resources
May 17, 2007 @ 07:56:00

In a new post to the PHP 10.0 blog today, Stas asks the question "Why do we still have resource type in PHP?"

Since 5.x, objects are perfectly capable on encapsulating any void * transparently (there's at least 2 Java bridges doing that, for example) and of course using objects doesn't force you to use OO syntax. [...] So objects as I see it can do anything resources can do. And much more - you could extend it (had we had file as object and not resource, streams probably would be much easier to implement), serialize it (provided correct methods of course), etc., etc.

He suggests letting them go all together and letting objects swoop in and take over, making things simpler to manage.

0 comments voice your opinion now!
resource type kill object encapsulate resource type kill object encapsulate


blog comments powered by Disqus

Similar Posts

Jani Hartikainen's Blog: Zend_Acl part 2: different roles and resources, more on access

DevShed: Object-Oriented Programming Through Design Patterns

Liip Blog: First Release of Proxy-Object

DevShed: Expanding the Application Range of Visitor Objects in PHP 5

phpaddiction: Url Routing with PHP - Part Two


Community Events





Don't see your event here?
Let us know!


symfony language list introduction developer api wordpress install application release threedevsandamaybe configure unittest series code library community podcast interview framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework