1--TEST--
2SPL: Test class_implements() function : variation - no interfaces and autoload
3--FILE--
4<?php
5/* Prototype  : array class_implements(mixed what [, bool autoload ])
6 * Description: Return all classes and interfaces implemented by SPL
7 * Source code: ext/spl/php_spl.c
8 * Alias to functions:
9 */
10
11echo "*** Testing class_implements() : variation ***\n";
12
13echo "--- testing no interfaces ---\n";
14class fs {}
15var_dump(class_implements(new fs));
16var_dump(class_implements('fs'));
17
18echo "\n--- testing autoload ---\n";
19var_dump(class_implements('non-existent'));
20var_dump(class_implements('non-existent2', false));
21
22
23function __autoload($classname) {
24   echo "attempting to autoload $classname\n";
25}
26
27?>
28===DONE===
29--EXPECTF--
30*** Testing class_implements() : variation ***
31--- testing no interfaces ---
32array(0) {
33}
34array(0) {
35}
36
37--- testing autoload ---
38attempting to autoload non-existent
39
40Warning: class_implements(): Class non-existent does not exist and could not be loaded in %s on line %d
41bool(false)
42
43Warning: class_implements(): Class non-existent2 does not exist in %s on line %d
44bool(false)
45===DONE===
46