xref: /PHP-7.4/Zend/tests/012.phpt (revision 782352c5)
1--TEST--
2class_exists() tests
3--FILE--
4<?php
5
6class foo {
7}
8
9var_dump(class_exists());
10var_dump(class_exists("qwerty"));
11var_dump(class_exists(""));
12var_dump(class_exists(array()));
13var_dump(class_exists("test", false));
14var_dump(class_exists("foo", false));
15var_dump(class_exists("foo"));
16var_dump(class_exists("stdClass", false));
17var_dump(class_exists("stdClass"));
18
19echo "Done\n";
20?>
21--EXPECTF--
22Warning: class_exists() expects at least 1 parameter, 0 given in %s on line %d
23NULL
24bool(false)
25bool(false)
26
27Warning: class_exists() expects parameter 1 to be string, array given in %s on line %d
28NULL
29bool(false)
30bool(true)
31bool(true)
32bool(true)
33bool(true)
34Done
35