php call function within same class
<?php
class a{
public function f1(){
echo 'this is a:f1 function';
}
function f3(){
a::f1(); // call here same class method
echo '<br>Call here f1 function ';
}
}
class b{
function f2(){
a::f3();
echo '<br> This is b:f2 function';
}
}
$ob= new b();
$ob->f2();
?>
OutPut:
this is a:f1 function
Call here f1 function
This is b:f2 function
Comments
Post a Comment
If you Satisfied , Please Leave a comment