Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79014 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88092 invoked from network); 19 Nov 2014 21:57:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Nov 2014 21:57:09 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.175 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.175 mail-ob0-f175.google.com Received: from [209.85.214.175] ([209.85.214.175:63260] helo=mail-ob0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/81-12113-4321D645 for ; Wed, 19 Nov 2014 16:57:08 -0500 Received: by mail-ob0-f175.google.com with SMTP id wp4so1247002obc.34 for ; Wed, 19 Nov 2014 13:57:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=iZ1/8MqIwfoCqOiz2HUpQACjo7vf67t0Dv7CnvQrZts=; b=caUKKyzH+UwIH9DNo8y13CKIjT/Mn6RIQEA02GdqO8eAAc3+jTEhj1xXS7YQZTg6ZR efJyrok66CSj+7CQR3jN3zTK467+s4HoJH8bRMFeLkDdCEWSqSNn66dR/8b9O/OUH6Gd QVDhJ7TrA0D/ldoWGUrYXhv5BFnNQ4Nbe7AMXcLqBTB2+QueYN32Iey9rOzhhGWqY/zN lgyrqAPZqr+3E10NCY3zXTC+HwXTzVnqjSYZ7wF7umPBTKUfgLg2UHDLSDVOl1u8JjYP GOkYicCNucTuiw8VvsCbQlFUtvwF1GKg3YC4hqvcS2U4Uyps6g51fG430d1jh5PyfD9E rfrQ== MIME-Version: 1.0 X-Received: by 10.202.72.85 with SMTP id v82mr11122132oia.14.1416434225245; Wed, 19 Nov 2014 13:57:05 -0800 (PST) Sender: morrison.levi@gmail.com Received: by 10.76.89.237 with HTTP; Wed, 19 Nov 2014 13:57:05 -0800 (PST) In-Reply-To: References: Date: Wed, 19 Nov 2014 14:57:05 -0700 X-Google-Sender-Auth: yGCVtHAH2PY2eRS7HbZFD8Hruvg Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [VOTE][RFC] Safe Casting Functions From: levim@php.net (Levi Morrison) > Since some things might have changed since you last read the RFC, I encourage you to read through it again. If there are any questions which have not yet been covered on the mailing list, feel free to ask them. - The RFC does not address how this is different from FILTER_VALIDATE_* from ext/filter. I know there was a mention of this on the mailing list, but the RFC should say why a tool that already exists to solve this kind of problem is insufficient, especially when it is enabled by default. - PHP suffers a lot from function bloat and this RFC provides multiple functions that do the same thing but differ only in how they handle errors. A simple validation of "can this be safely cast to an integer without dataloss?" avoid the issue entirely and would be fewer functions. To summarize: I like the idea of having tools that helps us convert between types in a lossless way, but I don't think this proposal is what is best for PHP. -1 for me but I hope to see this revisited.