Answer the question
In order to leave comments, you need to log in
Why is it not possible in PHP 5.5 to create a property equal to the instance of the successor in the class?
Who knows why it is impossible to create a property equal to the instance of the successor in the class?
php crashes without errors, just a crash. Version 5.5.16.
Code example:
class Pricing extends Master
{
/**
* @var Brute
*/
private $processingManager;
public function __construct()
{
parent::__construct();
$this->processingManager = new Brute();
}
/**
*
* @param array $result
* @throws Exception
*/
public function process($result)
{
return $this->processingManager->process($result);
}
}
class Brute extends Pricing {
public function process($result)
{
//some code
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question