<?php
class FizzBuzz {
const THREE = __LINE__;
const FOUR = __LINE__;
const FIVE = __LINE__;
const FIFTEEN = __LINE__;
public function main() {
for($i = (int) true;$i <= self::FIFTEEN;$i++) {
ob_start();
$this->f($i);
$this->b($i);
if (ob_get_contents() == false) {
echo $i;
}
echo PHP_EOL;
}
}
private function f($i) {
if ($i % self::THREE == false) {
echo substr(__CLASS__, false, self::FOUR);
}
}
private function b($i) {
if ($i % self::FIVE == false) {
echo substr(__CLASS__, self::FOUR, self::FOUR);
}
}
}
(new FizzBuzz())->main();