1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
Files
archived-php-src/ext/standard/tests/class_object/property_exists_error.phpt
T
2020-06-24 13:13:44 +02:00

22 lines
600 B
PHP

--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