<?php
class C {
public function __construct() {
$this->b = new B($this);
}
public function __destruct() {
echo 'c destructing!';
}
}
class B {
public function __construct($C){
$this->c = $C;
}
public function __destruct() {
echo 'b destructing!';
}
}
$c = new C;
die();
Deprecated: Creation of dynamic property B::$c is deprecated in /in/3B3bb on line 13
Deprecated: Creation of dynamic property C::$b is deprecated in /in/3B3bb on line 4
c destructing!b destructing!
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/3B3bb on line 3
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/3B3bb on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/3B3bb on line 3
Process exited with code 255.