1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/reflection/tests/ReflectionClass_export_basic2.phpt
Gabriel Caruso 4aabfe911e Revert "Update versions for PHP 8.0.21"
This reverts commit 6eedacdf15.
2022-07-06 12:06:48 +02:00

61 lines
886 B
PHP

--TEST--
ReflectionClass::__toString() - ensure inherited private props are hidden.
--FILE--
<?php
Class c {
private $a;
static private $b;
public ?int $c = 42;
public Foo $d;
}
class d extends c {}
echo new ReflectionClass("c"), "\n";
echo new ReflectionClass("d"), "\n";
?>
--EXPECTF--
Class [ <user> class c ] {
@@ %s 2-7
- Constants [0] {
}
- Static properties [1] {
Property [ private static $b = NULL ]
}
- Static methods [0] {
}
- Properties [3] {
Property [ private $a = NULL ]
Property [ public ?int $c = 42 ]
Property [ public Foo $d ]
}
- Methods [0] {
}
}
Class [ <user> class d extends c ] {
@@ %s 9-9
- Constants [0] {
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [2] {
Property [ public ?int $c = 42 ]
Property [ public Foo $d ]
}
- Methods [0] {
}
}