<?php class Test implements Countable { private $prop1, $prop2,$prop3,$prop4; public function count(){ return get_object_vars($this); } } $t = new Test; echo count($t);
You have javascript disabled. You will not be able to edit any code.