Lets run following code:
------- snip ------
class Perm {
static $read = bindec('001');
static $write = bindec('010');
static $delete = bindec('100');
}
print Perm::$read & Perm::$write;
------- snap ------
Output:
Parse error: parse error, unexpected '(', expecting ',' or ';' in ...
So, how do I get around that, i.e. initialize a class property with binary
value? Separate method or calculator are not very beautiful solutions.
--
Jaakko Holster