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