Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85509 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92585 invoked from network); 27 Mar 2015 16:32:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Mar 2015 16:32:14 -0000 Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.217.181 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.217.181 mail-lb0-f181.google.com Received: from [209.85.217.181] ([209.85.217.181:35039] helo=mail-lb0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/28-38005-C0685155 for ; Fri, 27 Mar 2015 11:32:13 -0500 Received: by lbdc10 with SMTP id c10so13412877lbd.2 for ; Fri, 27 Mar 2015 09:32:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=fJvxZLFSVLudjnUev77t+K7tTqFU5nTn3UbdATMKKjQ=; b=kaPYU42hYTw4ckas4YPXM6vTnS9jDZz8hAdLLQYVs0Wr+JHEI+I7vAirjPVFd+IG/x HVQ/0YNau3Pg4wqIZgPphkoKF4Sm0nSrMpK1+OKN7AHl5loOY6cVDFOJFClsD6raN/JS Ioj8fZ6v7tlC2DsicTw9g9N2Fh8fi8IiKQCIVW/zPr5Msm2yjMdS6lnuxPxsQvXQ104R boQ1dA9ByDTVx9Qo9FjgC4KJoV4wuidBo2m1/pG4m/FxH2Yprx83D4GrrH8NGi1B2n6S e0/O3oKCGwoaZRST9/t5jT9vLyQt7ZAlC/cS6cxvpwgetUoIejWnVNUao5qvAUJm8/eT w6PQ== X-Gm-Message-State: ALoCoQkGSYI2pbj3qToRns+9NCP6tz/6aCaVr6TG/1a3hhz6idDd+VgWUhOuNFh5/BWyDfxGb6fD MIME-Version: 1.0 X-Received: by 10.152.28.5 with SMTP id x5mr18114770lag.112.1427473929248; Fri, 27 Mar 2015 09:32:09 -0700 (PDT) Received: by 10.25.87.202 with HTTP; Fri, 27 Mar 2015 09:32:09 -0700 (PDT) X-Originating-IP: [78.147.6.134] In-Reply-To: References: Date: Fri, 27 Mar 2015 16:32:09 +0000 Message-ID: To: Dmitry Stogov Cc: "internals@lists.php.net" , Nikita Popov Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes From: danack@basereality.com (Dan Ackroyd) On 26 March 2015 at 20:19, Dmitry Stogov wrote: Hi Dmitry, > however the patch looks a bit surprising to me. > We have special function to do this - zend_ctor_make_null() and some tricks in the VM. > I made just a quick look over your patch but didn't find any references to them. Surprising is usually not good, so let me see if I can explain. I touched the minimal amount of code needed to achieve the desired behaviour. For the intl classes, the exception is being thrown by telling the intl error handling code to use an exception, no matter what the intl.use_exceptions setting is, if the error was emitted during a constructor: https://github.com/Danack/php-src/blob/InternalClassClean/ext/intl/intl_error.c#L114 I didn't touch any of the code zend_ctor_make_null. I guess if it's only used in these special cases, and they are going away it could also be removed? But it sounds like that would be a job for someone who understands that bit. > Please don't commit it yet. That won't be difficult, I don't have commit rights, and don't particularly want them. > Nikita, could you also take a quick look. Nikita pointed out that I may have missed a couple of classes. I'll try to get those updated before you have a look. cheers Dan