- var_dump: documentation ( source)
<?php
class MyBool {
const MY_TRUE = 1;
const MY_FALSE = 0;
private $_type;
private function __construct($type) { $this->_type = $type; }
function Type() { return $this->_type; }
static function MyTrue() { return new self(self::MY_TRUE); }
static function MyFalse() { return new self(self::MY_FALSE); }
}
var_dump(MyBool::MyTrue());