Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97679 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77315 invoked from network); 11 Jan 2017 13:59:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2017 13:59:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=michal@brzuchalski.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=michal@brzuchalski.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain brzuchalski.com designates 188.165.245.118 as permitted sender) X-PHP-List-Original-Sender: michal@brzuchalski.com X-Host-Fingerprint: 188.165.245.118 ns220893.ip-188-165-245.eu Received: from [188.165.245.118] ([188.165.245.118:54332] helo=poczta.brzuchalski.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/2E-55699-54A36785 for ; Wed, 11 Jan 2017 08:59:33 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by poczta.brzuchalski.com (Postfix) with ESMTP id 30CBD2984233 for ; Wed, 11 Jan 2017 14:59:30 +0100 (CET) Received: from poczta.brzuchalski.com ([127.0.0.1]) by localhost (poczta.brzuchalski.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oEwnPezPwlX2 for ; Wed, 11 Jan 2017 14:59:27 +0100 (CET) Received: from mail-ua0-f171.google.com (unknown [209.85.217.171]) by poczta.brzuchalski.com (Postfix) with ESMTPSA id 4C5152984235 for ; Wed, 11 Jan 2017 14:59:27 +0100 (CET) Received: by mail-ua0-f171.google.com with SMTP id i68so406751527uad.0 for ; Wed, 11 Jan 2017 05:59:27 -0800 (PST) X-Gm-Message-State: AIkVDXLqSfBggU87kG9bUp1jjNexL2zFHdAtOFt5PZwoAs17bEZTqNO+Y0ltFeCudgjdTwMTn0eR70qQdo3gQg== X-Received: by 10.159.36.209 with SMTP id 75mr3796185uar.51.1484143166551; Wed, 11 Jan 2017 05:59:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.35.204 with HTTP; Wed, 11 Jan 2017 05:59:25 -0800 (PST) In-Reply-To: References: Date: Wed, 11 Jan 2017 14:59:25 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Nikita Nefedov Cc: PHP internals list Content-Type: multipart/alternative; boundary=001a113d00203d02620545d202c4 Subject: Re: [PHP-DEV] Change in type-hint representation From: michal@brzuchalski.com (=?UTF-8?Q?Micha=C5=82_Brzuchalski?=) --001a113d00203d02620545d202c4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2017-01-11 14:57 GMT+01:00 Nikita Nefedov : > On Wed, 11 Jan 2017 16:51:22 +0300, Micha=C5=82 Brzuchalski < > michal@brzuchalski.com> wrote: > > >> >> 2017-01-11 14:35 GMT+01:00 Nikita Nefedov : >> >>> -- snip -- >>> >>> >>> [xxxx xxxx xxxx xxxx] xxxx xxxx xxxx xxy0 - for IS_OBJECT type hint >>> >>> where the `xxxx`s are a (zend_string *) pointer and `y` designates >>> >>> an allow_null flag >>> >>> >>> >> I've got prepared Object Typehint RFC https://wiki.php.net/rfc/objec >> t-typehint where >> IS_OBJECT is used without class name as type hint for any object kind, i= f >> this patch >> would be applied how can I deal with this new zend_type? >> As far as I undestand last 0 for IS_OBJECT and no (zend_string *) pointe= r >> would give me >> empty zend_string value right? So that won't bive me any chances to stor= e >> IS_OBJECT >> without classname am I right? >> > > Hey Michal, > > no for you it's quite easy, you can just store IS_OBJECT with > > ZEND_TYPE_ENCODE_HINT(IS_OBJECT, is_null) > > But then the code that checks ZEND_TYPE_IS_CLASS will need to > be adjusted to work with > > ZEND_TYPE_IS_HINT(type) =3D=3D 1 && ZEND_TYPE_HINT(type) =3D=3D IS_OB= JECT > Thanks. --=20 regards / pozdrawiam, -- Micha=C5=82 Brzuchalski about.me/brzuchal brzuchalski.com --001a113d00203d02620545d202c4--