|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2007-04-19 15:01 UTC] cellog@php.net
  [2007-04-19 15:18 UTC] amadeusz dot jasak at gmail dot com
  [2007-04-29 12:38 UTC] stas@php.net
  [2007-04-29 12:48 UTC] amadeusz dot jasak at gmail dot com
  [2007-04-29 12:53 UTC] stas@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 23:00:01 2025 UTC | 
Description: ------------ is_a function will be works if first argument is class name and next argument is interface name. Currently it isn't working... I can't check for class (not object) is implementing some interface Reproduce code: --------------- <?php inteface factory { public static function _factory($params); } class foo implements factory { public static function _factory($params) { $t = new foo(); return $t; // Sweet use of factory ;) } } var_dump ( is_a('foo', 'factory'), // Currently return false, but true is expected is_a($foo = new foo(), 'factory') // It is working but it isn't practicly ); ?> Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(false) bool(true)