summaryrefslogtreecommitdiff
path: root/Zend/tests/lsb_024.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/lsb_024.phpt')
-rw-r--r--Zend/tests/lsb_024.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/Zend/tests/lsb_024.phpt b/Zend/tests/lsb_024.phpt
new file mode 100644
index 0000000000..2c71c678d3
--- /dev/null
+++ b/Zend/tests/lsb_024.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Late Static Binding static:: accesses protected / public static variables of child
+class when the variable is private in parent class
+--FILE--
+<?php
+class A {
+ private static $value = 'A';
+
+ public static function out() {
+ echo static::$value, PHP_EOL;
+ }
+}
+class B extends A {
+ protected static $value = 'B';
+}
+class C extends A {
+ public static $value = 'C';
+}
+A::out();
+B::out();
+C::out();
+--EXPECT--
+A
+B
+C