Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102721 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36449 invoked from network); 10 Jul 2018 16:54:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2018 16:54:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.220 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.220 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.220] ([81.169.146.220:18369] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/39-15421-9C4E44B5 for ; Tue, 10 Jul 2018 12:54:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1531241670; s=strato-dkim-0002; d=kelunik.com; h=Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=EQdeVRw2J9xqk6mh5CjlbtapGP8yhB7fed4txPsM7r8=; b=e1xGC2lzcLCYgoJouPwLUjMsfhKxDrb3L48jbYO/5C2pNU8lXjBGxGa+5MHl0gMEvc vnJc4mER+9PjaIApKXilYiGOSk7Cw117/QBHD6bdMJdj/1ChS+Vlp82NNa9Wb7OxtJgq M32wwt8QYJW3eFkbZSxQRa/xMNzZ6cDdujSY5C0mlgG8ZBzi2koyclxHWofnScH/i22L YSXAkUVGgX/WFKph/v3+5ky/x4c9kTjgwmuD+Fieoy1Kv4UJ1ouQLa5Llj8XKGT944U0 nXZW6a7KhmT676uqp4H4xNT1+2KgFn1EmxymFePOAPpmqwTQ9YR34zQueULIeD7V41+q fL9g== X-RZG-AUTH: ":IWkkfkWkbvHsXQGmRYmUo9mlsGbEv0XHBzMIJSS+jKTzde5mDb8AaBUcZiArcA==" X-RZG-CLASS-ID: mo00 Received: by mail-yb0-f177.google.com with SMTP id r3-v6so8880699ybo.4 for ; Tue, 10 Jul 2018 09:54:30 -0700 (PDT) X-Gm-Message-State: APt69E1n1XnSdhf829ku6riErR815EoBsLI+IG8C9pGOqniFTjkXNKN7 KT83BrWBM05nSDhgakLQoLJdKt8Im+JhrQ0uUI8= X-Google-Smtp-Source: AAOMgpddCWbG645WojG6xKaS6LF2z8TV30lLtMYiOb7lfuap5P/+dIG2YQRTwBb/954rffPfBMfsj62H6Hx4nZWv3c4= X-Received: by 2002:a25:7c06:: with SMTP id x6-v6mr11681775ybc.271.1531241669844; Tue, 10 Jul 2018 09:54:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 10 Jul 2018 18:54:18 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Levi Morrison , Marco Pivetta Cc: Sara Golemon , Nikita Popov , PHP Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [VOTE] Deprecations for PHP 7.3 From: me@kelunik.com (Niklas Keller) I put that item onto the list. The author of https://github.com/mikey179/bovigo-assert originally had the issue that a function named `assert` behaves really weird. `assert()` in namespaced code might refer to the namespaced `assert()` function, but might also fall back to the global `assert()`. Whether the function is jumped around or not depends on `zend.assertions`, which is highly surprising, because it also jumps around `assert()` in namespaced code even if an `assert()` function exists in that namespace. Requiring an explicit `use function` is really weird. See https://3v4l.org/8EKdA for an example. The behavior in PHP 7.0+ is by-design and mentioned in the original assertions RFC. Regards, Niklas Am Mo., 9. Juli 2018 um 17:18 Uhr schrieb Levi Morrison : > > On Mon, Jul 9, 2018 at 8:43 AM Sara Golemon wrote: > > > > On Mon, Jul 9, 2018 at 5:57 AM, Marco Pivetta wrote: > > > Something unclear to me here: is the removal of `assert()` affecting also > > > my own`my\assert()` (imported via `use function`)? > > > > > Yes, but in fairness, your namespaced assert function is already a bit > > broken if you're not expecting it to be elided in production > > environments. > > > > -Sara > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > Can you prove this somehow? Based on how `use function my\assert;` > works a call to `assert()` later in that file should appear to engine > as `my\assert`, not `assert`. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >