Bug #81631 [Ver->Csd]: ::class with dynamic class name may yield wrong line number
| From: | git@php.net | Date: | Wed, 17 Nov 2021 15:07:25 +0000 |
| Subject: | Bug #81631 [Ver->Csd]: ::class with dynamic class name may yield wrong line number | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-237819@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81631&edit=1
ID: 81631
Updated by: git@php.net
Reported by: shaohua dot li at inf dot ethz dot ch
Summary: ::class with dynamic class name may yield wrong line
number
-Status: Verified
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: Ubuntu 20.04.3 LTS
PHP Version: 8.1Git-2021-11-17 (Git)
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikic
Revision: https://github.com/php/php-src/commit/4d4fe7639f3c217d169155b3f4217f5fe12ae114
Log: Fixed bug #81631
Previous Comments:
------------------------------------------------------------------------
[2021-11-17 14:22:43] cmb@php.net
Indeed: <https://3v4l.org/u2PV1>. Line 3 would be
correct.
------------------------------------------------------------------------
[2021-11-17 13:40:11] shaohua dot li at inf dot ethz dot ch
Description:
------------
Hi there,
I compiled php-src with clang13 and gcc11. For the following script,
sapi/cli/php emits
warning message "Warning: Undefined variable $b", but
For clang13 compiled one, the warning says the error happens on line 3.
For gcc11 compiled one, the warning says the error happens on line 2.
Test script:
---------------
<?php
$a = 0;
var_dump($b::class);
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81631&edit=1