Untitled
public text v1 · immutable<?php
class test
{
public
function __construct() {
$this->start();
}
private
function start()
{
print("This is wrong!\n");
}
}
class mytest extends test
{
public
function tryout()
{
$this->start();
}
protected
function start()
{
print("This is right!\n");
}
}
$w = new mytest();
$w->tryout();
?>
bledmeerfaste:~ # php5 test.php
This is wrong!
This is right!