PHP

PHP jest obiektowym, skryptowym jezykiem programowania zaprojektowanym do tworzenia dynamicznych stron www.


Funkcje PHP

Oficjalna strona PHP

Dodatkowe aplikacje PHP

Dodatkowe modu³y PHP

Wortal PHP
Zus Czestochowa - moto - aparaty cyfrowe nikon - Cukrzyca - kody do gier - korepetycje z chemii


Final Keyword

Final Keyword

PHP 5 introduces the final keyword, which prevents child classes from overriding a method by prefixing the definition with final. If the class itself is being defined final then it cannot be extended.

Przykład 19-29. Final methods example

<?php
class BaseClass {
   
public function test() {
       echo
"BaseClass::test() called\n";
   }
   
   
final public function moreTesting() {
       echo
"BaseClass::moreTesting() called\n";
   }
}

class
ChildClass extends BaseClass {
   
public function moreTesting() {
       echo
"ChildClass::moreTesting() called\n";
   }
}
// Results in Fatal error: Cannot override final method BaseClass::moreTesting()
?>

Przykład 19-30. Final class example

<?php
final
class BaseClass {
   
public function test() {
       echo
"BaseClass::test() called\n";
   }

   
// Here it doesn't matter if you specify the function as final or not
   
final public function moreTesting() {
       echo
"BaseClass::moreTesting() called\n";
   }
}

class
ChildClass extends BaseClass {
}
// Results in Fatal error: Class ChildClass may not inherit from final class (BaseClass)
?>
wyszukiwarka mp3 - zdjęcia - odzyskiwanie danych Kraków - odzyskiwanie danych Lublin - zdjęcia kobiet - Oprogramowenie tworzace sklepy internetowe nowszej generacji. - New York Limousine service company new york limo service NY limo services - opisy - Flota zarządzanie flotą Katowice - budowa stron internetowych - odzyskiwanie danych Katowice - oglądam filmy hd blu-ray - zdjęcia scenerii - japan - odzyskiwanie danych Szczecin

G:14,M:0,Y:41