Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andrey Hristov
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 th

Re: [PHP-DEV] Re: os x linking issue with extension

2005-04-08 Thread Justin Hannus
FYI: I've posted this topic to the php.pecl.dev list. You should reply there, it may be more constructive. -- Try compiling a your extension as a shared object and loading that into PHP with the dl() function. This way you can narrow down where the problem is coming from with the linker without

Re: [PHP-DEV] [PATCH] fix crash in solaris when fdopen() fails

2005-04-08 Thread Wez Furlong
It should probably go into the engine. --Wez. On Apr 8, 2005 7:46 PM, Andi Gutmans <[EMAIL PROTECTED]> wrote: > Not sure. Wez or Sara know that part of the code best. > I'll refrain from applying to the Zend Engine then or should I apply that > patch anyway? It seems quite harmless either way...

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Marcus Boerger
Hello Andi, Saturday, April 9, 2005, 1:10:12 AM, you wrote: > Marcus, > PHP is being used by millions of people and it is irrelevant whether you > think that const was wrong from the beginning or not, because we won't fix > something which has been around probably since 1995. Restating that ove

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andi Gutmans
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 c

Re: [PHP-DEV] [PATCH] fix crash in solaris when fdopen() fails

2005-04-08 Thread Andi Gutmans
Not sure. Wez or Sara know that part of the code best. I'll refrain from applying to the Zend Engine then or should I apply that patch anyway? It seems quite harmless either way... Andi At 04:58 PM 4/8/2005 +0200, Uwe Schindler wrote: OK - I found out that the fdopen() code is never called in the

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andi Gutmans
Marcus, PHP is being used by millions of people and it is irrelevant whether you think that const was wrong from the beginning or not, because we won't fix something which has been around probably since 1995. Restating that over and over is not productive as we should support what has been aroun

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Marcus Boerger
Hello Andi, erm yes i could put it to spl as a convenience function prefixed by 'spl_' and we could also add a namespace for class functions 'class_' or one for the reflection api (whatever that might be) or we could put those as static methods into class 'Reflection'. However all of these makee

Re: [PHP-DEV] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andrey Hristov
Hi Andi, I am not a Refl API guru, but for the simple check of method_exists() one has to create one object and then iterate a result set. The other solution is get_class_methods() which again returns an array which has to be used only once - let's say with in_array(). in_array() is a bit slow bec

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andi Gutmans
It's vital? Come on, you can convince me that it's nice to have, sure. But vital? What can it do which you can do with reflection API? If the name is sexier than you can write your own PHP function. At 06:36 PM 4/8/2005 +0200, Marcus Boerger wrote: Hello Andrey, same goes for property_exists()

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andi Gutmans
At 06:31 PM 4/8/2005 +0200, Andrey Hristov wrote: Hello Andi, Marcus, method_exists() is quite vital to help where the type hinting fail. Type hinting fail because it leads to a fatal error which is uncatchable and the code cannot react on this. Therefore, for me type hinting is kind of useless s

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andi Gutmans
At 06:14 PM 4/8/2005 +0200, Marcus Boerger wrote: Hello Andi, to this i only agree under two conditions. First we remove other like method_exists() too and second we fix handling of implicit public and dynamic properties. Unless the second is done i see such a function as relative important and d

[PHP-DEV] Stacktrace on fatal error (inspired my property_exists() discussion)

2005-04-08 Thread Andrey Hristov
Hi all, since long time ago I feel like disabled when a complex script dies with a fatal error, for example call on sth which is not an object and the only thing I get in the error log is the line it has happened. Without any logging facility running all the time and logging megabytes of data, mos

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Marcus Boerger
Hello Andrey, same goes for property_exists() which is why i added it. marcus Friday, April 8, 2005, 6:31:48 PM, you wrote: >Hello Andi, Marcus, > method_exists() is quite vital to help where the type hinting fail. > Type hinting fail because it leads to a fatal error which is uncatchable

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andrey Hristov
Hello Andi, Marcus, method_exists() is quite vital to help where the type hinting fail. Type hinting fail because it leads to a fatal error which is uncatchable and the code cannot react on this. Therefore, for me type hinting is kind of useless since I cannot catch my bugs by executing some code

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Marcus Boerger
Hello Andi, to this i only agree under two conditions. First we remove other like method_exists() too and second we fix handling of implicit public and dynamic properties. Unless the second is done i see such a function as relative important and don't like to use reflection overhead always. reg

Re: [PHP-DEV] Problem with ./configure on peardoc

2005-04-08 Thread Nuno Lopes
You should contact the peardoc team instead: [EMAIL PROTECTED] BTW, livedocs shouldn't work with peardoc correctly, because the indexing system is a bit phpdoc specific. Nuno - Original Message - Hello! I was wondering if I could get some help about a problem I have when I try to config

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andi Gutmans
Marcus, There was a long discussion about this a few months ago. The conclusion was to use the reflection_api for the very few instances where isset() isn't relevant. Although we have done bad stuff in the past, it's also not a good idea to continue polluting the global namespace. Please revert t

Re: [PHP-DEV] [PATCH] fix crash in solaris when fdopen() fails

2005-04-08 Thread Wez Furlong
Yeah, popen is tricky to replace. A workaround for solaris is to use proc_open() in the scripts instead. Other extensions that might have issues are those that will accept a stream to use as a source for data. Off the top of my head, you'll want to check the PDFlib and ming extensions. Actually,

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Lukas Smith
Andrey Hristov wrote: Hi Marcus, what about class_constant_exists("classname", "const") (a bit long function name though)? maybe leave of the ant ... class_const_exists() fits in with class MyClass { const constant = 'constant value'; function showConstant() { echo self::constant .

[PHP-DEV] Problem with ./configure on peardoc

2005-04-08 Thread colder.ch
Hello! I was wondering if I could get some help about a problem I have when I try to configure the peardoc for livedocs. the problem seems to be located on the autogenerated file : config.status ( line ~146) here is the log from the ./configure : *** checking for php... E:/HTTPserver/php/php c

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andrey Hristov
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

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Marcus Boerger
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: >Hi Marcus, > what about class_constant_exists("classname", "const") > (a bit long function name though)? > Andrey > Marcus Boerger wrote: >> helly

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c

2005-04-08 Thread Andrey Hristov
Hi Marcus, what about class_constant_exists("classname", "const") (a bit long function name though)? Andrey Marcus Boerger wrote: helly Fri Apr 8 09:33:17 2005 EDT Modified files: /ZendEngine2 zend_builtin_functions.c Log: - Add property_exits() http://cvs.p

Re: [PHP-DEV] [PATCH] fix crash in solaris when fdopen() fails

2005-04-08 Thread Uwe Schindler
OK - I found out that the fdopen() code is never called in the PHP environment, so patch is not needed (PHP sets zend_file_handle always to STREAM). But I still want to know for what extensions/functions the casts from posix to stdio are needed- Will casting appear somewhere when the user calls