blob: 3d8927882c603fea78c4c43d70dadb24149d72be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Test property_exists() function : error conditions
--FILE--
<?php
echo "*** Testing property_exists() : error conditions ***\n";
echo "\n-- Testing property_exists() function with incorrect arguments --\n";
$property_name = 'string_val';
try {
var_dump( property_exists(10, $property_name) );
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
*** Testing property_exists() : error conditions ***
-- Testing property_exists() function with incorrect arguments --
property_exists(): Argument #1 ($object_or_class) must be of type object|string, int given
|