php-src/Zend/tests/gh14961.phpt
Ilija Tovilo b368db204f
Fix comments between -> and keyword
Comments should not fall out of ST_LOOKING_FOR_PROPERTY.

Fixes GH-14961
Closes GH-14976
2024-07-16 23:40:18 +02:00

27 lines
364 B
PHP

--TEST--
GH-14961: Comment between -> and keyword
--FILE--
<?php
class C {
public $class = C::class;
}
$c = new C();
$c->/* comment */class = 42;
var_dump($c->/** doc comment */class);
var_dump($c->
// line comment
class);
var_dump($c->
# hash comment
class);
var_dump($c?->/* comment */class);
?>
--EXPECT--
int(42)
int(42)
int(42)
int(42)