mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
7aacc705d0
Closes GH-5958
32 lines
712 B
PHP
32 lines
712 B
PHP
--TEST--
|
|
Bug #69732 (can induce segmentation fault with basic php code)
|
|
--FILE--
|
|
<?php
|
|
class wpq {
|
|
private $unreferenced;
|
|
|
|
public function __get($name) {
|
|
return $this->$name . "XXX";
|
|
}
|
|
}
|
|
|
|
function ret_assoc() {
|
|
$x = "XXX";
|
|
return array('foo' => 'bar', $x);
|
|
}
|
|
|
|
$wpq = new wpq;
|
|
$wpq->interesting =& ret_assoc();
|
|
$x = $wpq->interesting;
|
|
printf("%s\n", $x);
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Undefined property: wpq::$interesting in %s on line %d
|
|
|
|
Notice: Indirect modification of overloaded property wpq::$interesting has no effect in %sbug69732.php on line 16
|
|
|
|
Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s on line %d
|