Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78221 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16742 invoked from network); 22 Oct 2014 08:26:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2014 08:26:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.175 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.220.175 mail-vc0-f175.google.com Received: from [209.85.220.175] ([209.85.220.175:57698] helo=mail-vc0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5A/12-01590-B2A67445 for ; Wed, 22 Oct 2014 04:26:20 -0400 Received: by mail-vc0-f175.google.com with SMTP id id10so1611704vcb.34 for ; Wed, 22 Oct 2014 01:26:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=2jovD3dY8mR+u58AUqEm3+Y++bvEWsAuqY9VB/4etBY=; b=Se6h7LOYib8xiNq+9xgXWZotGntUZRqhO/z01SRNo7YpwmY7gZrn2TQnLh0MGAh4TL 9CeOuGfs8s3TFhAEVGE4q03bC+VWE4c6Vd7fnE/0UUKbefU6H2oJ7/dNU2opeo4+c32N iW1GzwGNPvzAPh0z6r5zAV9CGWlBEuJP86T5MKtRJRWEkjKOrdLeK+dkvBH8sVZErSF3 4iuSbT4K7uiZkFAz2J7VxlPYSZKPSEA9asxm+MLSxmqt0Xwq3SWi3ybSFvQ+JliQ/kD9 vxbPHnUadB8H/hHCENCwcbB0TxQXI+JcgP8QTZXwrywdn69PXSWZ/1+b63YtuKIPXkya pcIw== X-Gm-Message-State: ALoCoQmYd5W+FKe/+1Hn8WFRXlMChhUFbLILpmUxLgjRFQqtZV+UY4l1Su9nndnSJHriZt3ylQvQjnYLPxjLwrzo0CH1I/3PTjZWllhdAWIUKUPFVIKLk8Jzz0TphmIgdclgO9Fmmkw577012P3jFYWxn8r4q8zZfw== X-Received: by 10.220.158.137 with SMTP id f9mr7175587vcx.34.1413966377113; Wed, 22 Oct 2014 01:26:17 -0700 (PDT) References: <66B7B28C-2651-4A71-AC2A-55D4C7BB3DDC@ajf.me> <866A39C7-6F11-408D-8BCA-594BA22E8569@ajf.me> <5447682B.2080100@sugarcrm.com> In-Reply-To: <5447682B.2080100@sugarcrm.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJkwG276Wk0Upx97kt7WiAQcULrfAGSwBqnAi5QI8QCGl+NrgJ4wNJWms+AsSA= Date: Wed, 22 Oct 2014 11:26:16 +0300 Message-ID: <2b3cf64265e54aaaa404198da2b58ded@mail.gmail.com> To: Stas Malyshev , Andrea Faulds Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: RE: [PHP-DEV] [RFC] Safe Casting Functions From: zeev@zend.com (Zeev Suraski) > -----Original Message----- > From: Stas Malyshev [mailto:smalyshev@sugarcrm.com] > Sent: Wednesday, October 22, 2014 11:18 AM > To: Dmitry Stogov; Andrea Faulds > Cc: PHP Internals > Subject: Re: [PHP-DEV] [RFC] Safe Casting Functions > > Hi! > > >>> - it's probably make sense to implement these function as a new > >> opcode(s) in VM > >> > >> That could be an optimisation later, yes. I note that you=E2=80=99ve a= dded > >> function replacement with opcodes for certain commonly-used > >> functions. We could make these functions use that. Then they=E2=80=99d= still > >> be usable as callbacks. > > If those are opcodes, those rules will require 2/3 majority for > acceptance, > since those will be the engine rules for type conversion, not just a set > of > functions. And, of course, the rules not matching the other engine rules > for > type conversion, sorry for sounding like broken record. Regardless of how we implement it, this requires a 2/3 majority - it'll be perceived as an integral part of the core language in the same way that gettype() and is_array() are considered parts of the core language. Introducing a new set of typing rules into PHP cannot be a 50%+1 decision. Zeev