blob: 487bd51863b88b3e5a49dd30c7261e76b8a67609 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--TEST--
Disable functions - Parsing of an Object as a return value of a function
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
<?php if (PHP_VERSION_ID >= 80000) print "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/disabled_functions_ret.ini
--FILE--
<?php
/*
Because Snuffleupagus used to cast everything with the `zval_get_string` function,
this sometimes raised exceptions, because PHP is awful.
*/
class Bob {
function a() {
return new StdClass;
}
}
$b = new Bob;
echo ($b->a() instanceof StdClass)?'Y':'N';
?>
--EXPECT--
Y
|