Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c
| From: | Andrey Hristov | Date: | Sat, 09 Apr 2005 06:19:52 +0000 |
| Subject: | Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15926@lists.php.net to get a copy of this message | ||
Hi Andi,
no problem of being sarcastic ;) After this discussion has started I decided
not to implement this class_constant_exists() because I just want to leave
our function API incomplete :P.
Now seriously, I have no problem, I took the errand just to exercise myself
and I will not advocate the existance of class_constant_exists().
Cheers,
Andrey
Andi Gutmans wrote:
Guess what. I've already cooked it up for you! (OK so I didn't write the code but...) /* {{{ proto public bool ReflectionClass::hasConstant(string name) Returns wether a constant exists or not */ Now if it really is too much for you to write then with 4 lines of code you can create your own class_constant_exists("classname", "const") function and prepend it and never worry about not having it again. On a more serious note, sorry for being sarcastic, but I really don't think we need to add yet another _exists() function for something which is easily done. Andi At 05:12 PM 4/8/2005 +0200, Andrey Hristov wrote:Hello Marcus, ok, I will try to cook up something but this time I won't be so fast since I have some pending commercial :) stuff. Andrey Marcus Boerger wrote:Hello Andrey, somehow i knew someone would ask for that.... how about you writing a patch? Friday, April 8, 2005, 5:01:24 PM, you wrote:-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.phpHi Marcus, what about class_constant_exists("classname", "const") (a bit long function name though)?AndreyMarcus Boerger wrote:helly Fri Apr 8 09:33:17 2005 EDTModified files:/ZendEngine2 zend_builtin_functions.c Log:- Add property_exits() http://cvs.php.net/diff.php/ZendEngine2/zend_builtin_functions.c?r1=1.262&r2=1.263&ty=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.262 ZendEngine2/zend_builtin_functions.c:1.263--- ZendEngine2/zend_builtin_functions.c:1.262 Mon Apr 4 13:23:38 2005 +++ ZendEngine2/zend_builtin_functions.c Fri Apr 8 09:33:15 2005@@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.262 2005/04/04 17:23:38 stas Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.263 2005/04/08 13:33:15 helly Exp $ */ #include "zend.h" #include "zend_API.h" @@ -43,6 +43,7 @@ static ZEND_FUNCTION(get_class); static ZEND_FUNCTION(get_parent_class); static ZEND_FUNCTION(method_exists); +static ZEND_FUNCTION(property_exists); static ZEND_FUNCTION(class_exists); static ZEND_FUNCTION(interface_exists); static ZEND_FUNCTION(function_exists); @@ -102,6 +103,7 @@ZEND_FE(get_class, NULL)