[ create a new paste ] login | about

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

PHP, pasted on May 23:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
class DB
{   
    protected function saveINDB($name)
    {
       echo $name;
    }

}

class Item extends DB
{
    private $name;

    function __construct($name) 
    {
           $this->saveINDB($name);       
    }        
}

$item = new Item('Free');


Output:
1
Free


Create a new paste based on this one


Comments: