<?php
/**
*@package extendObj
*@author Tianfan<arrbo@hotmail.com>
*@license Apache License 2.0
*@varsion 0.0.2
*@description this package is a part of hawkphp framework v2(haven't released)
*/
namespace hawkphp;
class intObj {
private $_int;
public function __construct(int $int) {
$this->_int = $int;
}
public function __toString(): string {
return strval($this->_int);
}
public function toInt(): int {
return $this->_int;
}
public function chr(): stringObj {
return new stringObj(\chr($this->_int));
}
public function toString(): stringObj {
return new stringObj(\strval($this->_int));
}
public function decBin(): stringObj {
return new stringObj(\decbin($this - _int));
}
}
|