PHP  
 PHP_5_3
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Expected Test Failure Report for Zend/tests/access_modifiers_008.phpt ('Inconsistencies when accessing protected members')

Script

1: <?php
2:
3:
class {
4:     static protected function 
f() {return 'A::f()';}
5: }
6: class 
B1 extends {
7:     static protected function 
f() {return 'B1::f()';}
8: }
9: class 
B2 extends {
10:     static public function 
test() {echo B1::f();}
11: }
12:
B2::test();
13:
14:
?>
15:

Expected

Fatal error: Call to protected method B1::f() from context 'B2' in %s on line %d

Output

B1::f()

Diff

001+ B1::f()
001- Fatal error: Call to protected method B1::f() from context 'B2' in %s on line %d

 

Generated at Sun, 27 Jul 2014 12:58:43 +0000 (21 hours ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.