- str_repeat: documentation ( source)
<?php
class Foo
{
private $value;
public function __construct($value)
{
$this->value = $value;
}
public function Weeee()
{
$value = $this->value;
return function() {
return str_repeat($this->value, 10);
};
}
}
$f = new Foo('--');
echo $f->Weee();