Re: [RFC] Deprecations for PHP 8.5
| From: | Christoph M. Becker | Date: | Tue, 08 Jul 2025 12:35:51 +0000 |
| Subject: | Re: [RFC] Deprecations for PHP 8.5 | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127957@lists.php.net to get a copy of this message | ||
On 08.07.2025 at 01:30, Theodore Brown wrote:
>>> Almost all of these were quickly fixed by sending a pull request.
>>
>> See https://externals.io/message/126000, in particular
>> Derick's reply.
>
> I believe Derick was commenting specifically on using separate <?php ?> tags interleaved
> around
> each switch, case, break, and endswitch statement (which there are no plans to deprecate).
> Based
> on the follow-up replies from him and Tim, deprecating semicolon-terminated case statements
> would not affect his xdebug.org site templates.
The use case we're talking about would be something like (indented to
avoid issues with Newsreaders):
<?switch ($foo):?>
<?case 1?>
<p>1</p>
<?break?>
<?case 2?>
<p>2</p>
<?break?>
<?endswitch?>
If that code wouldn't trigger a deprecation notice, fine. However, we
had apparently introduced an inconsistency then.
Note that I do not advocate writing such code, but I wouldn't be
surprised if such code exists in the wild, but even more suprised if
such code would be found in a Composer package.
Christoph M. Becker