php-src/Zend/tests/exception_with_by_ref_message.phpt
Nikita Popov 2a0c4edfda Drop convert_to usage in zend_exceptions
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.
2014-10-06 20:14:30 +02:00

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