<?php
class Test implements Countable {
private $prop1, $prop2,$prop3,$prop4;
public function allProps(){
return get_object_vars($this);
}
}
$t = new Test;
echo count($t->allProps());
Fatal error: Class Test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Countable::count) in /in/TnQmT on line 2
Process exited with code 255.
Fatal error: Class Test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Countable::count) in /in/TnQmT on line 8
Process exited with code 255.
Output for 5.0.5
Fatal error: Interface 'Countable' not found in /in/TnQmT on line 2
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Fatal error: Class 'Countable' not found in /in/TnQmT on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting '{' in /in/TnQmT on line 2
Process exited with code 255.