3v4l.org

run code in 300+ PHP versions simultaneously
<?php class wpq { private $unreferenced; public function __get($name) { return (array)$this->$name; } } function ret_assoc() { return array('foo' => 'bar'); } $wpq = new wpq; $wpq->interesting =& ret_assoc(); $x = $wpq->interesting; printf("%s\n", $x);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: Undefined property: wpq::$interesting in /in/HK98o on line 7 Notice: Indirect modification of overloaded property wpq::$interesting has no effect in /in/HK98o on line 16 Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in /in/HK98o:16 Stack trace: #0 {main} thrown in /in/HK98o on line 16
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Notice: Undefined property: wpq::$interesting in /in/HK98o on line 7 Notice: Indirect modification of overloaded property wpq::$interesting has no effect in /in/HK98o on line 16 Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in /in/HK98o:16 Stack trace: #0 {main} thrown in /in/HK98o on line 16
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in /in/HK98o:16 Stack trace: #0 {main} thrown in /in/HK98o on line 16
Process exited with code 255.
Output for 5.6.12 - 5.6.28
Notice: Undefined property: wpq::$interesting in /in/HK98o on line 7 Notice: Indirect modification of overloaded property wpq::$interesting has no effect in /in/HK98o on line 16 Fatal error: Cannot assign by reference to overloaded object in /in/HK98o on line 16
Process exited with code 255.
Output for 5.5.27 - 5.5.35, 5.6.11
Notice: Undefined property: wpq::$interesting in /in/HK98o on line 7 Notice: Indirect modification of overloaded property wpq::$interesting has no effect in /in/HK98o on line 16 Strict Standards: Only variables should be assigned by reference in /in/HK98o on line 16 Notice: Undefined property: wpq::$interesting in /in/HK98o on line 7 Notice: Array to string conversion in /in/HK98o on line 18 Array
Output for 5.4.9 - 5.4.45, 5.5.24 - 5.5.26, 5.6.7 - 5.6.10
Notice: Undefined property: wpq::$interesting in /in/HK98o on line 7 Notice: Indirect modification of overloaded property wpq::$interesting has no effect in /in/HK98o on line 16 Strict Standards: Only variables should be assigned by reference in /in/HK98o on line 16 Notice: Undefined property: wpq::$interesting in /in/HK98o on line 7
Process exited with code 139.
Output for 5.4.2 - 5.4.8
Notice: Undefined property: wpq::$interesting in /in/HK98o on line 7 Notice: Indirect modification of overloaded property wpq::$interesting has no effect in /in/HK98o on line 16 Strict Standards: Only variables should be assigned by reference in /in/HK98o on line 16
Process exited with code 139.

preferences:
214.96 ms | 402 KiB | 242 Q