Learn PHP Tutorial 26 overriding and final method

Veröffentlicht am: 23 Oktober 2015
auf dem Kanal: Champion Mahipal
308
3

This video is made for learning about overriding and final method in PHP.

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.

override_function

override_function — Overrides built-in functions

Description ¶

bool override_function string $function_name , string $function_args , string $function_code
Overrides built-in functions by replacing them in the symbol table.

Parameters ¶

function_name
The function to override.

function_args
The function arguments, as a comma separated string.

Usually you will want to pass this parameter, as well as the function_code parameter, as a single quote delimited string. The reason for using single quoted strings, is to protect the variable names from parsing, otherwise, if you use double quotes there will be a need to escape the variable names, e.g. \$your_var.

function_code
The new code for the function.

Return Values ¶

Returns TRUE on success or FALSE on failure.


Auf dieser Seite können Sie das Online-Video Learn PHP Tutorial 26 overriding and final method mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Champion Mahipal 23 Oktober 2015 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 308 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!