php-src/Zend/tests/class_exists_002.phpt

27 lines
440 B
Plaintext
Raw Normal View History

2008-05-13 01:57:21 +08:00
--TEST--
Testing several valid and invalid parameters
--FILE--
<?php
class foo {
2018-09-17 01:16:42 +08:00
2008-05-13 01:57:21 +08:00
}
var_dump(class_exists(''));
var_dump(class_exists(NULL));
var_dump(class_exists('FOO'));
var_dump(class_exists('bar'));
var_dump(class_exists(1));
var_dump(class_exists(new stdClass));
?>
--EXPECTF--
bool(false)
bool(false)
bool(true)
bool(false)
bool(false)
Warning: class_exists() expects parameter 1 to be string, object given in %s on line %d
NULL