1--TEST-- 2Test get_declared_interfaces() function : basic functionality 3--FILE-- 4<?php 5echo "*** Testing get_declared_interfaces() : basic functionality ***\n"; 6 7// Zero arguments 8echo "\n-- Testing get_declared_interfaces() function with Zero arguments --\n"; 9var_dump(get_declared_interfaces()); 10 11foreach (get_declared_interfaces() as $interface) { 12 if (!interface_exists($interface)) { 13 echo "Error: $interface is not a valid interface.\n"; 14 } 15} 16 17echo "\n-- Ensure userspace classes are not listed --\n"; 18Class C {} 19var_dump(in_array('C', get_declared_interfaces())); 20 21echo "\n-- Ensure userspace interfaces are listed --\n"; 22Interface I {} 23var_dump(in_array('I', get_declared_interfaces())); 24 25echo "Done"; 26?> 27--EXPECTF-- 28*** Testing get_declared_interfaces() : basic functionality *** 29 30-- Testing get_declared_interfaces() function with Zero arguments -- 31array(%d) { 32%a 33} 34 35-- Ensure userspace classes are not listed -- 36bool(false) 37 38-- Ensure userspace interfaces are listed -- 39bool(true) 40Done 41