[ create a new paste ] login | about

Link: http://codepad.org/9sxXFi2X    [ raw code | output | fork ]

PHP, pasted on Nov 23:
<?php

class MyParent {

    private $prop;

    function __construct(){
        $this->prop = 'test';
    }

}

class MyChild extends MyParent {

    function __construct(){
        $this->prop = 'test2';
    }

}

$obj = new MyChild;
print_r($obj);

?>


Output:
1
2
3
4
5
MyChild Object
(
    [prop:private] => 
    [prop] => test2
)


Create a new paste based on this one


Comments: