mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
2a0c4edfda
To make everything work correctly with refs. I'm unsure whether the GET_PROPERTY_SILENT distinction is really necessary, because the choice seemed pretty random, but kept it around.
22 lines
365 B
PHP
22 lines
365 B
PHP
--TEST--
|
|
Exception with by-ref message
|
|
--FILE--
|
|
<?php
|
|
|
|
class MyException extends Exception
|
|
{
|
|
public function __construct(&$msg) {
|
|
$this->message =& $msg;
|
|
}
|
|
}
|
|
|
|
$msg = 'Message';
|
|
throw new MyException($msg);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught exception 'MyException' with message 'Message' in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s on line %d
|