File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / spl / tests / class_implements_basic.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 6 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
SPL: Test class_implements() function : basic 
--FILE--
<?php
/* Prototype  : array class_implements(mixed what [, bool autoload ])
 * Description: Return all classes and interfaces implemented by SPL 
 * Source code: ext/spl/php_spl.c
 * Alias to functions: 
 */

echo "*** Testing class_implements() : basic ***\n";


interface foo { }
class bar implements foo {}

var_dump(class_implements(new bar));
var_dump(class_implements('bar'));


?>
===DONE===
--EXPECT--
*** Testing class_implements() : basic ***
array(1) {
  ["foo"]=>
  string(3) "foo"
}
array(1) {
  ["foo"]=>
  string(3) "foo"
}
===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>