xref: /PHP-5.5/Zend/tests/bug69732.phpt (revision 9031a902)
1--TEST--
2Bug #69732 (can induce segmentation fault with basic php code)
3--FILE--
4<?php
5class wpq {
6    private $unreferenced;
7
8    public function __get($name) {
9        return $this->$name . "XXX";
10    }
11}
12
13function ret_assoc() {
14	$x = "XXX";
15    return array('foo' => 'bar', $x);
16}
17
18$wpq = new wpq;
19$wpq->interesting =& ret_assoc();
20$x = $wpq->interesting;
21printf("%s\n", $x);
22--EXPECTF--
23Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6
24
25Notice: Indirect modification of overloaded property wpq::$interesting has no effect in %sbug69732.php on line 16
26
27Strict Standards: Only variables should be assigned by reference in %sbug69732.php on line 16
28
29Notice: Undefined property: wpq::$interesting in %sbug69732.php on line 6
30XXX
31