Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112399 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 45329 invoked from network); 3 Dec 2020 14:57:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Dec 2020 14:57:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DB8421804C4 for ; Thu, 3 Dec 2020 06:24:59 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 3 Dec 2020 06:24:59 -0800 (PST) Received: by mail-ej1-f54.google.com with SMTP id m19so3695915ejj.11 for ; Thu, 03 Dec 2020 06:24:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NSnEUQDsuSD3tfC0C6TwJyIOEmGogCxgEJiZ+I/MktE=; b=ZDjRwcYXAvH42EWr5YTcnAIJJnFtpucHoavAibIzJFxWQpw0nZU3e0aJwUdGWHJt8R dNxe52oBCr+8LAjuE2S7IM68KFZT0V+iAhlhRnZr60sCEkafUF7kmjB3j3w6+hEsnxMk txb16W0ScGZ1zwqKdkQoX5TnqkAhuHPerVnn1CcecxZiS/ZbdrLnOEwTz3G+63jfzZoL XaPbBlComWz3+a46saLUad3PPy5XTpmlYb+p07p/7NMfsDV71WLyY0l6dt5oQ0gseZJk J6/oe+nLu+ZPuIlfTEu9rF+UAqNnuqWfJEVKxE/sjAOS2wqzFTYmSjK5mBYjhRgtMlIO 4hHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NSnEUQDsuSD3tfC0C6TwJyIOEmGogCxgEJiZ+I/MktE=; b=s7WCGEsk2g/5MmNgrHQMTwOuCXScSAWaC3QKHigHaMuEsGLcfGnx2d+Tm1LYTGYpBF YTpXrTiA0j7N+N5LH+kWRMa7S+mxHJtK9Rcf2QMz0+LXb9jTXrTBZN+f8f6tq0Ebsyxt BqSx2xfrIJkvY6EVP+BIGcZ52xZ7YhbOVUQH0jMf5/MaPy6akz2nJaQamY3DjPK9p/Pi d7ukWNwe8T5mwsSPRP8vdRXIyS/GzRv3FriwogECupKjCexFT+F0Y3N9KQspFcpVwuFY 1WkZ8pQxHtmkrL5Ju6k1ZLVOY7Ai+TwwU49XRyol0KrIoQeaWqnVSCkNNYxe+hfeXVHQ xunA== X-Gm-Message-State: AOAM532NTgX+rmC1L6cIP6+l8diRbuQGN3F/wGtdVPzeWlwVMeOJFskf wAayAgQZn++u5w2vSgLUKUzqTfzYu27ktxlj9y0= X-Google-Smtp-Source: ABdhPJyUTw7X0cxe4iTS+IukO+bwT0GVQPie1aRzpBRLi6zAajnpI+lTXJBU4UrigKBb4pXWm9dsu/IoSMiVIziEJmU= X-Received: by 2002:a17:906:5841:: with SMTP id h1mr2444671ejs.77.1607005498025; Thu, 03 Dec 2020 06:24:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 3 Dec 2020 14:24:46 +0000 Message-ID: To: Thomas Hruska Cc: PHP Development Content-Type: multipart/alternative; boundary="000000000000dcaa5b05b5901f83" Subject: Re: [PHP-DEV] PHP 8 incompatible change documentation issues From: george.banyard@gmail.com ("G. P. B.") --000000000000dcaa5b05b5901f83 Content-Type: text/plain; charset="UTF-8" Please use the documentation list to talk about documentation issues and not the internal list. On Thu, 3 Dec 2020 at 14:18, Thomas Hruska wrote: > https://www.php.net/manual/en/migration80.incompatible.php > > Under the "String to Number Comparison" section of the migration guide, > there's no mention of explicit casts being unaffected. Using an > explicit cast should be the general recommendation anyway. That is, > anyone doing this: > > 42 == "42foo" > > Should be doing an explicit cast before the comparison: > > 42 == (int)"42foo" > > So as to avoid the issue altogether. > > > > "match is now a reserved keyword." > > No mention of variables named $match. Assigning the result of > preg_match() to a variable named $match is pretty common. Linking > "reserved keyword" to the page with the list of reserved keywords and/or > reminding the reader that variables named $match are unaffected would be > helpful. > PRs are welcome on https://github.com/php/doc-en/pulls > "The needle argument for strpos(), strrpos(), stripos(), strripos(), > strstr(), stristr() and strrchr() can now be empty." > > I fail to see how this change is useful/correct. In my experience, > passing in an empty string for the needle to any of those functions has > always been part of a more critical application bug. > The point is about consistency with all these sort of functions from various extensions (mbstring, intl, iconv). Moreover, this has nothing to do with the docs, and cannot be changed at this point in time. > I'm also not sure why this is in the "Incompatible Changes" page of the > migration documentation. > Because it is incompatible with code which expects these cases to return false. > -- > Thomas Hruska > CubicleSoft President > > CubicleSoft has over 80 original open source projects and counting. > Plus a couple of commercial/retail products. > > What software are you looking to build? > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > George P. Banyard --000000000000dcaa5b05b5901f83--