diff options
author | Robin Fernandes <robinf@php.net> | 2008-01-30 14:25:57 +0000 |
---|---|---|
committer | Robin Fernandes <robinf@php.net> | 2008-01-30 14:25:57 +0000 |
commit | 7eb114a9cf19e585be1a0075f5b1275a40d68e91 (patch) | |
tree | f6ca9f65deb757efca4406c18041569f3cce2710 /tests/classes/property_override_privateStatic_protectedStatic.phpt | |
parent | b9df996a3b372a869a9e30cb02d45ac63e031450 (diff) | |
download | php-git-7eb114a9cf19e585be1a0075f5b1275a40d68e91.tar.gz |
Adding tests for class features, including __autoload(), property inheritance rules and class constants.
Diffstat (limited to 'tests/classes/property_override_privateStatic_protectedStatic.phpt')
-rw-r--r-- | tests/classes/property_override_privateStatic_protectedStatic.phpt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/classes/property_override_privateStatic_protectedStatic.phpt b/tests/classes/property_override_privateStatic_protectedStatic.phpt new file mode 100644 index 0000000000..169ff9a377 --- /dev/null +++ b/tests/classes/property_override_privateStatic_protectedStatic.phpt @@ -0,0 +1,32 @@ +--TEST-- +Redeclare inherited private static property as protected static. +--FILE-- +<?php + class A + { + private static $p = "A::p (static)"; + static function showA() + { + echo self::$p . "\n"; + } + } + + class B extends A + { + protected static $p = "B::p (static)"; + static function showB() + { + echo self::$p . "\n"; + } + } + + + A::showA(); + + B::showA(); + B::showB(); +?> +--EXPECTF-- +A::p (static) +A::p (static) +B::p (static) |