<?php
class D {
public function __get($name) {
echo "D::__get($name)\n";
}
public function __destruct() {
echo "D::__destruct\n";
}
public function __wakeup() {
echo "D::__wakeup\n";
$this->b = 42;
}
}
class C {
public function __destruct() {
echo "C::__destruct\n";
$this->c->b;
}
}
unserialize('O:1:"C":1:{s:1:"c";O:1:"D":0:{};}');
Deprecated: Creation of dynamic property C::$c is deprecated in /in/UOHAh on line 23
Warning: unserialize(): Error at offset 31 of 33 bytes in /in/UOHAh on line 23
C::__destruct
D::__get(b)
D::__wakeup
Deprecated: Creation of dynamic property D::$b is deprecated in /in/UOHAh on line 12
D::__destruct
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Deprecated: Creation of dynamic property C::$c is deprecated in /in/UOHAh on line 23
Warning: unserialize(): Error at offset 31 of 33 bytes in /in/UOHAh on line 23
C::__destruct
D::__get(b)
D::__wakeup
Deprecated: Creation of dynamic property D::$b is deprecated in /in/UOHAh on line 12
D::__destruct
Output for 8.2.0 - 8.2.18
Deprecated: Creation of dynamic property C::$c is deprecated in /in/UOHAh on line 23
Notice: unserialize(): Error at offset 31 of 33 bytes in /in/UOHAh on line 23
C::__destruct
D::__get(b)
D::__wakeup
Deprecated: Creation of dynamic property D::$b is deprecated in /in/UOHAh on line 12
D::__destruct
D::__wakeup
C::__destruct
D::__destruct
Notice: unserialize(): Error at offset 32 of 33 bytes in /in/UOHAh on line 23
Output for 5.6.31 - 5.6.40
D::__wakeup
C::__destruct
D::__destruct
Notice: unserialize(): Error at offset 31 of 33 bytes in /in/UOHAh on line 23
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/UOHAh on line 4
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/UOHAh on line 4
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/UOHAh on line 4
Process exited with code 255.