Re: Convert ext/xml to use an object instead of resource

From: Date: Tue, 12 Feb 2019 16:21:09 +0000
Subject: Re: Convert ext/xml to use an object instead of resource
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-104370@lists.php.net to get a copy of this message
On Tue, Feb 12, 2019 at 10:18 AM Nikita Popov <nikita.ppv@gmail.com> wrote: > Very much opposed to any kind of special handling for is_resource(). We > used to do this for is_object() and __PHP_Incomplete_Class and I'm very > happy to be rid of this special behavior. Let's not add is back in a new > place. > Agreed. This is something that we discuss every time a resource->object conversion comes up and we always agree that special-casing lies the way of madness and the tiny fraction of user code that actually checks this can adapt if (is_resource($x) || $x instanceof NewClassName) Done and sorted. Let's skip this repeat of the past and move forward with the killing all resources with fire. -Sara

« previous php.internals (#104370) next »