[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hintsrevisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Per Lundberg
On Sat, 2003-03-29 at 12:59, Zeev Suraski wrote: > Remember that we don't want to encourage exception based programming anyway. > Catching an exception should typically be the last thing done in a program, > right before it terminates. Writing exception-driven applications is > extremely discourag

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Missing P in PPP as in package?!

2003-03-31 Thread Per Lundberg
On Sat, 2003-03-29 at 02:56, Preston L. Bannister wrote: > PHP is not Java - and for good reason. PHP is a rather nice scripting > language. PHP scripts are loaded and run for /each and every /request. Your whole argumentation is based on this assumption, that PHP *only* is used for writing w

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Zeev Suraski
At 11:35 31/03/2003, Per Lundberg wrote: On Sat, 2003-03-29 at 12:59, Zeev Suraski wrote: > Remember that we don't want to encourage exception based programming anyway. > Catching an exception should typically be the last thing done in a program, > right before it terminates. Writing exception-dr

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hintsrevisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Per Lundberg
On Mon, 2003-03-31 at 10:53, Zeev Suraski wrote: > At 11:35 31/03/2003, Per Lundberg wrote: > >On Sat, 2003-03-29 at 12:59, Zeev Suraski wrote: > > > Writing exception-driven applications is extremely discouraged. > >What is the rationale behind this? > (a) This is very much the case for all langua

Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Wez Furlong
How does this differ from the return values of functions using WRONG_PARAM_COUNT and zend_parse_parameters()? --Wez On Sat, 29 Mar 2003, Zeev Suraski wrote: > At 16:23 29/03/2003, Timm Friebe wrote: > >On Sat, 2003-03-29 at 13:10, Zeev Suraski wrote: > >[...] > > > >After reading through a bunch

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentExceptioninstead of E_ERROR]

2003-03-31 Thread Wez Furlong
Type hinting, if it causes a bail-out, renders the scripts non-portable to (the growing number of) applications that intend to stick around for longer than a short web-request. So yes, I'd be happier without anyone having type hints than having type hints E_ERROR. (which is inconsistent with all

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentExceptioninstead of E_ERROR]

2003-03-31 Thread Stanislav Malyshev
WF>> Type hinting, if it causes a bail-out, renders the scripts WF>> non-portable to (the growing number of) applications that intend to WF>> stick around for longer than a short web-request. Well, I do not completely understand how it is "non-portable". If the script calls "hinted" function with

[PHP-DEV] magic_quotes_sybase and php_stripslashes

2003-03-31 Thread moshe doron
could some1 explain the first if here (php_stripslashes:cybase mode) http://lxr.php.net/source/php4/ext/standard/string.c#2324 that have nothing with slashes but with quotes? could this if be removed safely? tnx moshe. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, vi

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentExceptioninstead of E_ERROR]

2003-03-31 Thread Wez Furlong
You can use function_exists() to avoid a fatal error, but there is no equivalent function_parameters_are_ok() API to avoid a miserable death in the situations that I have already mentioned. Why not just be consistent with all the other parameter checks and raise an E_WARNING and RETURN_NULL when t

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentExceptioninstead of E_ERROR]

2003-03-31 Thread Derick Rethans
On Mon, 31 Mar 2003, Wez Furlong wrote: > You can use function_exists() to avoid a fatal error, but there is no > equivalent function_parameters_are_ok() API to avoid a miserable death > in the situations that I have already mentioned. > > Why not just be consistent with all the other parameter c

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentExceptioninstead of E_ERROR]

2003-03-31 Thread Stanislav Malyshev
WF>> I don't see what is so special about hinted parameters that they have to WF>> bail out the engine, while the built-in (and extension) functions will WF>> happily return NULL and continue execution. The functions that are built-in have defined behaviour of returning NULL in case of error (if

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Zeev Suraski
At 15:55 31/03/2003, Wez Furlong wrote: You can use function_exists() to avoid a fatal error, but there is no equivalent function_parameters_are_ok() API to avoid a miserable death in the situations that I have already mentioned. Why not just be consistent with all the other parameter checks and ra

Re: [PHP-DEV] magic_quotes_sybase and php_stripslashes

2003-03-31 Thread Sander Roobol
On Mon, Mar 31, 2003 at 03:45:13PM +0200, moshe doron wrote: > could some1 explain the first if here (php_stripslashes:cybase mode) > http://lxr.php.net/source/php4/ext/standard/string.c#2324 > that have nothing with slashes but with quotes? Sybase escapes ' with '' and NUL with \0 so we needed a

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentExceptioninstead of E_ERROR]

2003-03-31 Thread Wez Furlong
IMO, both built-in and user-land functions should be equally black box. Please don't have it bail out unless there is some kind of function_parameters_are_ok() API so that careful programmers can work around this issue. --Wez. On Mon, 31 Mar 2003, Zeev Suraski wrote: > At 15:55 31/03/2003, Wez

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentExceptioninstead of E_ERROR]

2003-03-31 Thread Stanislav Malyshev
WF>> Please don't have it bail out unless there is some kind of WF>> function_parameters_are_ok() API so that careful programmers can work WF>> around this issue. Careful programmers should know interface of called functions and never call them with parameters that do not match the interface. :)

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentExceptioninstead of E_ERROR]

2003-03-31 Thread Wez Furlong
Yes, but when using call_user_function, __call(), and RPC servers, you don't always know what function you are calling at the time you write the script. Thats where is_callable()/function_exists() are extremely useful. --Wez. On Mon, 31 Mar 2003, Stanislav Malyshev wrote: > WF>> Please don't ha

Re: [PHP-DEV] magic_quotes_sybase and php_stripslashes

2003-03-31 Thread Jani Taskinen
Heh..so magic_quotes_sybase ini setting affects how stripslashes() function works too? Pretty high WTF factor there. It should be an additional option for php_stripslashes() that is passed where appropriate. --Jani On Mon, 31 Mar 2003, Sander Roobol wrote: >On Mon, Mar 31

Re: [PHP-DEV] magic_quotes_sybase and php_stripslashes

2003-03-31 Thread Jan Schneider
Quoting Jani Taskinen <[EMAIL PROTECTED]>: > Heh..so magic_quotes_sybase ini setting affects how stripslashes() > function works too? Pretty high WTF factor there. It should be > an additional option for php_stripslashes() that is passed where > appropriate. As long as it affects

Re: [PHP-DEV] magic_quotes_sybase and php_stripslashes

2003-03-31 Thread moshe doron
"Sander Roobol" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, Mar 31, 2003 at 03:45:13PM +0200, moshe doron wrote: > > could some1 explain the first if here (php_stripslashes:cybase mode) > > http://lxr.php.net/source/php4/ext/standard/string.c#2324 > > that have nothing wi

Re: [PHP-DEV] magic_quotes_sybase and php_stripslashes

2003-03-31 Thread moshe doron
there is one more problem just like the http://bugs.php.net/bug.php?id=22904 bug the problem is also for 'regular' magic mode. the addslashes add slashes anly when the slash follow by '\'' or '\"' or '\\' but on stripslashes it's nuke all the slashes without considering whats came after that. her

Re: [PHP-DEV] modules and registering destructors

2003-03-31 Thread Thies C. Arntzen
On Sun, Mar 30, 2003 at 04:34:36PM -0500, Rob Richards wrote: > My questions for the other day seem a lot off. After going through modules > much more, I need someone to either confirm or explain a little more on how > resources within a module are destroyed. What I am seeing stepping through > the

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Marcus Börger
At 14:03 31.03.2003, Stanislav Malyshev wrote: WF>> Type hinting, if it causes a bail-out, renders the scripts WF>> non-portable to (the growing number of) applications that intend to WF>> stick around for longer than a short web-request. Well, I do not completely understand how it is "non-portable

[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Marcus Börger
At 14:55 31.03.2003, Wez Furlong wrote: You can use function_exists() to avoid a fatal error, but there is no equivalent function_parameters_are_ok() API to avoid a miserable death in the situations that I have already mentioned. Why not just be consistent with all the other parameter checks and ra

RE: [PHP-DEV] crash problem in php's mysql library (Threads !)

2003-03-31 Thread NAIK,ROSHAN (HP-Cupertino,ex1)
Im using the libmysql bundled with PHP. Are you suggesting the use of external libmysql instead of the one bundled with PHP ? --Roshan > -Original Message- > From: Georg Richter [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 29, 2003 10:34 PM > To: NAIK,ROSHAN (HP-Cupertino,ex1)

Re: [PHP-DEV] magic_quotes_sybase and php_stripslashes

2003-03-31 Thread moshe doron
> well, since magic mode could be corrupted if we handly playing with the string, e.g. > adding slash into string, i wrong here. the only problem was the reported bug thats > now fixed on the cvs. this fix also addslashes no matter sybase or not but still > exist delte between sybase and regula

Re: [PHP-DEV] Reflection API RFC

2003-03-31 Thread Andrei Zmievski
On Sun, 30 Mar 2003, Alan Knowles wrote: > - If you stored token start/end then you would be able to do getSource > for function/method/class.. etc.. (which can do a load file/tokenizer > and return implode('',array_range(starttoken,endtoken) Keeping track of the tokens this way would require q

[PHP-DEV] RE: [Zend Engine 2] Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Harald Radi
> Well, I do not completely understand how it is "non-portable". If the > script calls "hinted" function with wrong parameters, it is a > fatal error > - I see no sane (meaning, safe not for your particular > application, but > for all of them) way to continue from here except for saying the u

[PHP-DEV] RE: [Zend Engine 2] Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Harald Radi
> WF>> Please don't have it bail out unless there is some kind of > WF>> function_parameters_are_ok() API so that careful > programmers can work > WF>> around this issue. > > Careful programmers should know interface of called functions > and never > call them with parameters that do not match

[PHP-DEV] PHP is now a Microsoft Partner

2003-03-31 Thread Magnus Maatta
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 PHP is now a Microsoft Partner Issued on: April 1, 2003 Software: PHP Platforms: All The PHP Group has is proud to announce that we are now a partner of Microsoft Corporation. Description After many hours of talking with people

Re: [PHP-DEV] PHP is now a Microsoft Partner

2003-03-31 Thread George Schlossnagle
haha, happy April Fools troll. On Monday, March 31, 2003, at 10:40 PM, Magnus Maatta wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 PHP is now a Microsoft Partner -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c basic_functions.h

2003-03-31 Thread Sebastian Bergmann
Sterling Hughes wrote: > sterling Tue Apr 1 00:01:50 2003 EDT > > Modified files: > /php4/ext/standardbasic_functions.c basic_functions.h > Log: > Add the landonize() and landonize_url() functions which provide a > secure alternative to the sha1() and sha1_file() f

Re: [PHP-DEV] PHP is now a Microsoft Partner

2003-03-31 Thread Ján Šuňavec
It's joke?? If it is, it's bad joke, man.. Akelavlk > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > >PHP is now a Microsoft Partner > > Issued on: April 1, 2003 > Software: PHP > Platforms: All > > >The PHP Group has is proud to announce th

[PHP-DEV] CVS Account Request: mbr

2003-03-31 Thread Mircea Banu
I wanna translate (a complete translation) the PHP documentation in Romanian; also I wanna help with other PHP developping stuff. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Reflection API RFC

2003-03-31 Thread Sebastian Bergmann
Andrei Zmievski wrote: > What do you mean by unloadclass? I think what the name suggests: unload a class, ie. undeclare it. -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.d

[PHP-DEV] Re: PHP is now a Microsoft Partner

2003-03-31 Thread nicos
Nice try ! -- Regards. M.CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com Hébergement de sites internets. "Magnus Maatta" <[EMAIL PROTECTED]> a écrit dans le message news: [EMAIL PROTECTED] > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > >PHP is now a Microsoft Partner > > Issued on:

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Zeev Suraski
At 16:32 31/03/2003, Wez Furlong wrote: Yes, but when using call_user_function, __call(), and RPC servers, you don't always know what function you are calling at the time you write the script. I'd argue that it makes sense that the function in that case will not use type hints, then, and use insta

Re: [PHP-DEV] magic_quotes_sybase and php_stripslashes

2003-03-31 Thread moshe doron
> the problem is also for 'regular' magic mode. > the addslashes add slashes anly when the slash follow by '\'' or '\"' or > '\\' but on stripslashes it's nuke all the slashes without considering whats > came after that. well, since magic mode could be corrupted if we handy playing with the strin

Re: [PHP-DEV] modules and registering destructors

2003-03-31 Thread Rob Richards
I have 2 different patches that fix this specific issue, but am not sure if they are actually correct - as there may be a lower level issue, or even which one would be correct. One patch is on the Zend engine which will go through the destructor list in reverse within zend_clean_module_rsrc_dtors.

Re: [PHP-DEV] Re: Type hints revisited [IllegalArgumentException instead of E_ERROR]

2003-03-31 Thread Marcus Börger
At 15:27 31.03.2003, Stanislav Malyshev wrote: WF>> Please don't have it bail out unless there is some kind of WF>> function_parameters_are_ok() API so that careful programmers can work WF>> around this issue. Careful programmers should know interface of called functions and never call them with pa