<?php class Test { protected $attr = 123; public function attrTest($attr) { return $this->$attr; } } $bla = new Test(); var_dump($bla->attrTest('attr'));
You have javascript disabled. You will not be able to edit any code.