mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Writing to a proprety that hasn't been declared is deprecated, unless the class uses the #[AllowDynamicProperties] attribute or defines __get()/__set(). RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
35 lines
538 B
PHP
35 lines
538 B
PHP
--TEST--
|
|
Bug #60833 (self, parent, static behave inconsistently case-sensitive)
|
|
--FILE--
|
|
<?php
|
|
class A {
|
|
static $x = "A";
|
|
function testit() {
|
|
var_dump(new sELF);
|
|
var_dump(new SELF);
|
|
}
|
|
}
|
|
|
|
class B extends A {
|
|
static $x = "B";
|
|
function testit() {
|
|
PARENT::testit();
|
|
var_dump(new sELF);
|
|
var_dump(new PARENT);
|
|
var_dump(STATIC::$x);
|
|
}
|
|
}
|
|
$t = new B();
|
|
$t->testit();
|
|
?>
|
|
--EXPECT--
|
|
object(A)#2 (0) {
|
|
}
|
|
object(A)#2 (0) {
|
|
}
|
|
object(B)#2 (0) {
|
|
}
|
|
object(A)#2 (0) {
|
|
}
|
|
string(1) "B"
|