<?php
class Test {
public $prop1, $prop2,$prop3,$prop4;
private $prop11, $prop12,$prop13,$prop14;
protected $prop21, $prop22,$prop23,$prop24;
public countProps() {
return get_object_vars($this);
}
}
$t = new Test;
echo count( (array) $t);
- Output for 5.4.0 - 5.4.28
- Parse error: syntax error, unexpected 'countProps' (T_STRING), expecting variable (T_VARIABLE) in /in/bb3Pk on line 7
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/bb3Pk on line 7
Process exited with code 255.
preferences:
179.97 ms | 1395 KiB | 65 Q