mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
44 lines
851 B
PHP
44 lines
851 B
PHP
--TEST--
|
|
WeakReference object handlers
|
|
--FILE--
|
|
<?php
|
|
$wr = WeakReference::create(new stdClass);
|
|
|
|
try {
|
|
$wr->disallow;
|
|
} catch (Error $ex) {
|
|
var_dump($ex->getMessage());
|
|
}
|
|
|
|
try {
|
|
$wr->disallow = "writes";
|
|
} catch (Error $ex) {
|
|
var_dump($ex->getMessage());
|
|
}
|
|
|
|
try {
|
|
isset($wr->disallow);
|
|
} catch (Error $ex) {
|
|
var_dump($ex->getMessage());
|
|
}
|
|
|
|
try {
|
|
unset($wr->disallow);
|
|
} catch (Error $ex) {
|
|
var_dump($ex->getMessage());
|
|
}
|
|
|
|
try {
|
|
$disallow = &$wr->disallowed;
|
|
} catch (Error $ex) {
|
|
var_dump($ex->getMessage());
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
string(47) "WeakReference objects do not support properties"
|
|
string(47) "WeakReference objects do not support properties"
|
|
string(47) "WeakReference objects do not support properties"
|
|
string(47) "WeakReference objects do not support properties"
|
|
string(56) "WeakReference objects do not support property references"
|
|
|