- Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.29, 5.6.8 - 5.6.13
- Fatal error: Cannot use 'Parent' as class name as it is reserved in /in/n9Lcs on line 4
Process exited with code 255.
<?php
class Parent extends Observer
{
function createChild()
{
$this->callme(); // this is OK
return new Child (function() { $this->callme(); });
}
}
class Child
{
private $gatewayFunction;
public function __constructor (Closure $gatewayFunction)
{
$this->gatewayFunction = $gatewayFunction;
}
public function __destroy()
{
$this->gatewayFunction->__invoke();
}
}