1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/tests/classes/property_override_privateStatic_protected.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

34 lines
466 B
PHP

--TEST--
Redeclare inherited private static property as protected.
--FILE--
<?php
class A
{
private static $p = "A::p (static)";
static function showA()
{
echo self::$p . "\n";
}
}
class B extends A
{
protected $p = "B::p";
function showB()
{
echo $this->p . "\n";
}
}
A::showA();
$b = new B;
$b->showA();
$b->showB();
?>
--EXPECT--
A::p (static)
A::p (static)
B::p