lenerd3000 Posted April 28, 2008 Share Posted April 28, 2008 i have a functions declared in the other page and a class in another page... is it possible to make the functions become my class's own functions? i want to make a simple core files for my website. Link to comment https://forums.phpfreaks.com/topic/103254-class-function-problem/ Share on other sites More sharing options...
trq Posted April 28, 2008 Share Posted April 28, 2008 <?php class a { public function foo() { echo "this is foo\n"; } } class b extends a { public function bar() { echo "this is bar\n"; } } $obj = new b; $obj->foo(); $obj->bar(); ?> Link to comment https://forums.phpfreaks.com/topic/103254-class-function-problem/#findComment-529184 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.