- Output for 5.3.0 - 5.3.21, 5.4.0 - 5.4.11
- Fatal error: Cannot use $this as lexical variable in /in/59dTt on line 15
Process exited with code 255.
<?php
class Prototype
{
public function __call($method,$args)
{
$f = $this->$method;
return $f();
}
}
$object = new Prototype;
$object->monday = function(){
return "monday";
};
$object->hello_monday = function() use($this){
echo "what a beautiful ".$this->monday()." day!";
};
$object->{"hello_monday"}();