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
18spl_autoload_register(function ($classname) {
19   echo "attempting to autoload $classname\n";
20});
21
22echo "\n--- testing autoload ---\n";
23var_dump(class_implements('non_existent'));
24var_dump(class_implements('non_existent2', false));
25
26?>
27===DONE===
28--EXPECTF--
29*** Testing class_implements() : variation ***
30--- testing no interfaces ---
31array(0) {
32}
33array(0) {
34}
35
36--- testing autoload ---
37attempting to autoload non_existent
38
39Warning: class_implements(): Class non_existent does not exist and could not be loaded in %s on line %d
40bool(false)
41
42Warning: class_implements(): Class non_existent2 does not exist in %s on line %d
43bool(false)
44===DONE===
45