function __construct($string, $start = 0, $end = false) { parent::__construct($string); $this->start = $start; $this->end = $end; $this->length = $end ? $end - $start : $this->length - $start; }
/** * TeraBytes constructor. * @param integer $teraBytes */ protected function __construct($teraBytes) { $this->assertCorrectByteValue($teraBytes); parent::__construct((int) $teraBytes * 1024 * 1024 * 1024 * 1024); }
function __construct($text, $encoding = false) { parent::__construct($text); $this->encoding = $encoding ?: self::$default_encoding; }