All pastes #275651 Raw Edit

Untitled

public text v1 · immutable
·published 2006-12-11 18:26 UTC
rendered paste body
<?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!