Quick actions

cmd+k|ctrl+k

Navigation

Languages

Php constructor

Snippet info

Language

Php

Visibility

public

Author

petter

Created

2016-12-17T00:57:24Z

Updated

2016-12-17T00:57:24Z

<?php

class Foo {
    private $x;
    
    public function foo($x) {
        $this->x = $x;
    }
    
    public function bar() {
        return $this->x;
    }
    
}

$foo = new Foo(3);
echo $foo->bar();
INFO