1--TEST-- 2SPL: Test class_uses() function : variation - no interfaces and autoload 3--FILE-- 4<?php 5echo "*** Testing class_uses() : variation ***\n"; 6 7echo "--- testing no traits ---\n"; 8class fs {} 9var_dump(class_uses(new fs)); 10var_dump(class_uses('fs')); 11 12spl_autoload_register(function ($classname) { 13 echo "attempting to autoload $classname\n"; 14}); 15 16echo "\n--- testing autoload ---\n"; 17var_dump(class_uses('non_existent')); 18var_dump(class_uses('non_existent2', false)); 19 20?> 21--EXPECTF-- 22*** Testing class_uses() : variation *** 23--- testing no traits --- 24array(0) { 25} 26array(0) { 27} 28 29--- testing autoload --- 30attempting to autoload non_existent 31 32Warning: class_uses(): Class non_existent does not exist and could not be loaded in %s on line %d 33bool(false) 34 35Warning: class_uses(): Class non_existent2 does not exist in %s on line %d 36bool(false) 37