php class function echo Hello World class extends function new

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<?php
class a
{
function a()
{
echo "Hello World!";
}
}
class b extends a
{
function b()
{
}
}
$c = new b();
?>