[ create a new paste ] login | about

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

PHP, pasted on Apr 28:
<?php

abstract class Foo {

    private $e;

    public function setE($val) {
       $this->e = $val;
    }

    public function getE() {
       return $this->e;
    }

}

class Bar extends Foo {
    
}

$bar = new Bar;
$bar->setE('hello');
var_dump( $bar->getE() );


Output:
1
string(5) "hello"


Create a new paste based on this one


Comments: