- str_repeat: documentation ( source)
<?php
class Foo
{
private $value;
public function __construct($value)
{
$this->value = $value;
}
public function Weeee()
{
$that = &$this;
return function() use ($that) {
return str_repeat($this->value, 1000);
};
}
}
$foo = new Foo();
echo $foo->Weeee();