Mistři v programování na #hovnokod

PHP #2662

nudaaaaaaaaaaaaaaaa

<?php
class Exttt {
function __construct($Data) {
$this->Data = $Data;
}
function __toString() {
Return $this->Data;
}
function strlen() {
Return strlen($this->Data);
}
}
class DoThat {
function setData($Data) {
$this->Data = $Data;
}
function getData() {
Return new Exttt($this->Data);
}
}

$thing = new DoThat();
$thing->setData("123");
echo $thing->getData()."\n"; // 123
echo $thing->getData()->strlen(); // 3

Anonymous,