Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96464 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12090 invoked from network); 19 Oct 2016 05:54:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Oct 2016 05:54:07 -0000 Authentication-Results: pb1.pair.com header.from=tendoaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tendoaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.53 as permitted sender) X-PHP-List-Original-Sender: tendoaki@gmail.com X-Host-Fingerprint: 209.85.213.53 mail-vk0-f53.google.com Received: from [209.85.213.53] ([209.85.213.53:34959] helo=mail-vk0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/85-12428-D7A07085 for ; Wed, 19 Oct 2016 01:54:07 -0400 Received: by mail-vk0-f53.google.com with SMTP id q126so18027159vkd.2 for ; Tue, 18 Oct 2016 22:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=v1L9odlhi1FUvlqmgYaJ0vJn3YtdK9UPLGrl0k+6gDI=; b=rn/S47NJaVDPg3Wp+VexT1zIm6ITevPMbEtlKbOOjmWp6/MYpwW7SB997++cfdvZ/u o8r80Emi1Gx0GZH9hhpJjFTIKixuyCatEolFOjVi/L3QhmKlVQaVPxGyNRMcLF01wisy 870OMZTHOjM+YXTQB9PcWrJbgOwBA5k9SDob5TlQZSsYxEjL6odgzvQhAjqbKkBcCuXv wqB+tSGWNG+nVhYdTSMe26/CN0438SgdgX1/t1/dTbI+9/vpJJ2RSVrqeT58EPqAzXoE +Z/jUPMpjID7iP97u5UMHO/7ddJEL3u5n1hWjIzPiUnxgLQAXcmBCPje6J1SKZJ5PrcD PDJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=v1L9odlhi1FUvlqmgYaJ0vJn3YtdK9UPLGrl0k+6gDI=; b=bRmj9kReygFv2RNBQVvyEp5fPbRZEKRobg449lBcLz3SK91VaAl2gXE5+BbzqzognB mL0LvzMCcYHZH4qYNkVkc3ZhF90rwmdPu1MUjZZ+OhkVk3tcZPdR1yqE85VF9xP5pdQx KtN4NIjnZJvf1qxZyYSJFZLB+PrCJtqOWrJtU9QdC6QlMrNDknkEuAot/HOU0ugp7hCG l8RwjuGGaYoHsd4hJDHi9CGBxibPNjrw0Xbnxxe5JYdlaImTSXqc4GKS25Q/d4pZ/Rj2 q8yCvR/169PJlO4XOfey0L8pGvVuGFqH7poWapRh6TesdM1FGwa9XTjIg0RwOHwFxSVs RnTg== X-Gm-Message-State: AA6/9RlPdOH+EW/4B5YyfNi7Nxcg+66j963ZhpGT6I3RGHldHFzcm9pLHa4DIUZhH0jHMXbuKBdbaHaEIX8GNQ== X-Received: by 10.31.102.6 with SMTP id a6mr3588854vkc.151.1476856443241; Tue, 18 Oct 2016 22:54:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.46.7 with HTTP; Tue, 18 Oct 2016 22:54:02 -0700 (PDT) Date: Wed, 19 Oct 2016 01:54:02 -0400 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=94eb2c092d68af07d6053f316f43 Subject: [PHP DEV] Bugs, BC, Strict Mode?? From: tendoaki@gmail.com (Michael Morris) --94eb2c092d68af07d6053f316f43 Content-Type: text/plain; charset=UTF-8 I've seen a couple bug fixes come up that create BC breaks for the code reliant on the broken behavior. JavaScript has a opt in strict mode for this. Perhaps PHP could do the same. An opt in mode with the declare directive that turns on bug fixes that are BC problems. One recent example, the behavior of parse_url. The ternary operator being backwards (right to left instead of left to right as in all other languages) is another. This approach lets some PHP 8 code be developed early by making troublesome bug fixes available early. The drawback is code bloat - both implementations would be in the code at the same time. Also, core functions would need to check if the calling code wants the normal or strict version of the function. Or maybe namespaces and the use (use Strict; ) could handle this. --94eb2c092d68af07d6053f316f43--