#46813 [Csd]: class_exists doesn`t work with fully qualified namespace

From: Date: Wed, 10 Dec 2008 11:52:36 +0000
Subject: #46813 [Csd]: class_exists doesn`t work with fully qualified namespace
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131861@lists.php.net to get a copy of this message
ID: 46813 User updated by: php at mobhoc dot de Reported By: php at mobhoc dot de Status: Closed Bug Type: Class/Object related Operating System: Gentoo Linux PHP Version: 5.3CVS-2008-12-09 (snap) New Comment: The function interface_exists has the same behaviour. namespace test; { interface inner { } } var_dump(interface_exists('\test\inner', false)); # false Previous Comments: ------------------------------------------------------------------------ [2008-12-09 19:19:40] johannes@php.net This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2008-12-09 17:20:43] php at mobhoc dot de Description: ------------ The function class_exists doesn`t work with a fully qualified namespace. Reproduce code: --------------- namespace test; { class inner { } } $inner = new \test\inner(); var_dump(class_exists('\test\inner', false)); Expected result: ---------------- true Actual result: -------------- false ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46813&edit=1

« previous php.bugs (#131861) next »