1--TEST--
2Calling exception getters when properties hold references
3--FILE--
4<?php
5
6class MyException extends Exception {
7    public function __construct(&$refMsg, &$refCode, &$refFile, &$refLine) {
8        $this->message =& $refMsg;
9        $this->code =& $refCode;
10        $this->file =& $refFile;
11        $this->line =& $refLine;
12    }
13}
14
15$refMsg = "foo";
16$refCode = 0;
17$refFile = "foobar";
18$refLine = 42;
19$ex = new MyException($refMsg, $refCode, $refFile, $refLine);
20var_dump($ex->getMessage());
21var_dump($ex->getCode());
22var_dump($ex->getFile());
23var_dump($ex->getLine());
24
25?>
26--EXPECT--
27string(3) "foo"
28int(0)
29string(6) "foobar"
30int(42)
31