Re: [PHP-DEV] Re: Static weirdness..

2004-02-22 Thread Josh Fuhs
> Quoting Josh Fuhs <[EMAIL PROTECTED]>: > If I'm not mistaken, Java does not allow calls to static methods via > object instances. Sorry, I retract this. Someone just showed me an example of it. But it still seems like a bad practice. Josh -- PHP Internals - PHP Runtime Development Mailing Li

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

2004-02-22 Thread Edin Kadribasic
On Monday, Feb 23, 2004, at 00:23 Europe/Copenhagen, Sterling Hughes wrote: At 00:23 23/02/2004 +0100, Edin Kadribasic wrote: On Sunday, Feb 22, 2004, at 23:57 Europe/Copenhagen, Andi Gutmans wrote: Can someone check this on a non-intel CPU with a 32bit int? gcc 3.3 produces the same warning (t

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

2004-02-22 Thread Sterling Hughes
> At 00:23 23/02/2004 +0100, Edin Kadribasic wrote: > > >On Sunday, Feb 22, 2004, at 23:57 Europe/Copenhagen, Andi Gutmans wrote: > >>Can someone check this on a non-intel CPU with a 32bit int? > > > >gcc 3.3 produces the same warning (this decimal constant is unsigned only > >in ISO C90) on Powe

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

2004-02-22 Thread Andi Gutmans
At 00:23 23/02/2004 +0100, Edin Kadribasic wrote: On Sunday, Feb 22, 2004, at 23:57 Europe/Copenhagen, Andi Gutmans wrote: Can someone check this on a non-intel CPU with a 32bit int? gcc 3.3 produces the same warning (this decimal constant is unsigned only in ISO C90) on PowerPC G4. The code prod

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

2004-02-22 Thread Edin Kadribasic
On Sunday, Feb 22, 2004, at 23:57 Europe/Copenhagen, Andi Gutmans wrote: Can someone check this on a non-intel CPU with a 32bit int? gcc 3.3 produces the same warning (this decimal constant is unsigned only in ISO C90) on PowerPC G4. The code produces no floating point exceptions though. c at the

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

2004-02-22 Thread Michael Walter
Andi Gutmans wrote: At 23:49 22/02/2004 +0100, Michael Walter wrote: No, -2147483648 is the lower bound and 2147483647 is the upper bound for signed integers. -2147483648 = 1000 2147483647 = 0111 it still doesn't explain the FPE here. What d

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

2004-02-22 Thread Michael Walter
Sterling Hughes wrote: George Schlossnagle wrote: On Feb 22, 2004, at 5:15 PM, Derick Rethans wrote: On Sun, 22 Feb 2004 [EMAIL PROTECTED] wrote: It's generating an idivl, which gives you an exception if the (signed) result is too large (a.k.a. integer overflow). Did you notice your compiler w

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

2004-02-22 Thread Andi Gutmans
At 23:49 22/02/2004 +0100, Michael Walter wrote: No, -2147483648 is the lower bound and 2147483647 is the upper bound for signed integers. -2147483648 = 1000 2147483647 = 0111 it still doesn't explain the FPE here. What does explain it is th

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

2004-02-22 Thread Sterling Hughes
> George Schlossnagle wrote: > > > >On Feb 22, 2004, at 5:15 PM, Derick Rethans wrote: > > > >>On Sun, 22 Feb 2004 [EMAIL PROTECTED] wrote: > >> > >>>It's generating an idivl, which gives you an exception if the (signed) > >>>result is too large (a.k.a. integer overflow). > >>> > >>>Did you notice

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

2004-02-22 Thread Michael Walter
George Schlossnagle wrote: On Feb 22, 2004, at 5:15 PM, Derick Rethans wrote: On Sun, 22 Feb 2004 [EMAIL PROTECTED] wrote: It's generating an idivl, which gives you an exception if the (signed) result is too large (a.k.a. integer overflow). Did you notice your compiler warning "this decimal const

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

2004-02-22 Thread Michael Walter
Derick Rethans wrote: >> [embarassing mistake] No, -2147483648 is the lower bound and 2147483647 is the upper bound for signed integers. Yes of course. -2147483648 = 1000 2147483647 = 0111 it still doesn't explain the FPE here. What does exp

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

2004-02-22 Thread George Schlossnagle
On Feb 22, 2004, at 5:15 PM, Derick Rethans wrote: On Sun, 22 Feb 2004 [EMAIL PROTECTED] wrote: It's generating an idivl, which gives you an exception if the (signed) result is too large (a.k.a. integer overflow). Did you notice your compiler warning "this decimal constant is unsigned only in IS

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

2004-02-22 Thread Derick Rethans
On Sun, 22 Feb 2004 [EMAIL PROTECTED] wrote: > It's generating an idivl, which gives you an exception if the (signed) > result is too large (a.k.a. integer overflow). > > Did you notice your compiler warning "this decimal constant is unsigned > only in ISO C90"? ;) Yes I did > +2147483648 is: 10

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

2004-02-22 Thread cm
Derick Rethans wrote: > On Sun, 22 Feb 2004, Derick Rethans wrote: > > >>On Sun, 22 Feb 2004, Andi Gutmans wrote: >> >> >>>Huh? What platform crashes? Can you send reproducible C code? >> >>int main(void) { >>long a = -2147483648; >>long b = -1; >>long c; >> >>c = a % b; >>} > > > D

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

2004-02-22 Thread Timm Friebe
On Sun, 2004-02-22 at 21:49, Derick Rethans wrote: > On Sun, 22 Feb 2004, Derick Rethans wrote: [...] > Does anybody has a clue *why* this gives a floating point error btw? Works fine with GCC 3.2.2, GCC 2.95.4 spits out "Internal compiler error in `float_signal', at toplev.c:2442", which I pasted

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

2004-02-22 Thread Derick Rethans
On Sun, 22 Feb 2004, Michael Spector wrote: > On Sun, 22 Feb 2004, Derick Rethans wrote: > > > On Sun, 22 Feb 2004, Derick Rethans wrote: > > > > > On Sun, 22 Feb 2004, Andi Gutmans wrote: > > > > > > > Huh? What platform crashes? Can you send reproducible C code? > > > > > > int main(void) { > >

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

2004-02-22 Thread Michael Spector
On Sun, 22 Feb 2004, Derick Rethans wrote: > On Sun, 22 Feb 2004, Derick Rethans wrote: > > > On Sun, 22 Feb 2004, Andi Gutmans wrote: > > > > > Huh? What platform crashes? Can you send reproducible C code? > > > > int main(void) { > > long a = -2147483648; > > long b = -1; > > long c

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

2004-02-22 Thread Derick Rethans
On Sun, 22 Feb 2004, Derick Rethans wrote: > On Sun, 22 Feb 2004, Andi Gutmans wrote: > > > Huh? What platform crashes? Can you send reproducible C code? > > int main(void) { > long a = -2147483648; > long b = -1; > long c; > > c = a % b; > } Does anybody has a clue *why* this giv

[PHP-DEV] bug #27097

2004-02-22 Thread Nuno Lopes
Hi, Can I please ask your opinion about this bug: http://bugs.php.net/bug.php?id=27097 Its because the manual says integer in protos and sometimes its a long. Nuno -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Static weirdness..

2004-02-22 Thread Marcus Boerger
Hello Josh, Sunday, February 22, 2004, 6:44:14 AM, you wrote: > Sorry, mis-click. > Quoting Josh Fuhs <[EMAIL PROTECTED]>: >> If I'm not mistaken, Java does not allow calls to static methods via object >> instances. It simply doesn't make sense to couple the unecessary object >> instance >> int

[PHP-DEV] CVS Account Request: msm_bd

2004-02-22 Thread Mojibul Hoque
Learn PHP & Use PHP. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP5: Exceptions must valid objects that are derived from class Exception?

2004-02-22 Thread Marcus Boerger
Hello Derick, Sunday, February 22, 2004, 6:03:28 PM, you wrote: > On Sun, 22 Feb 2004, [ISO-8859-1] Erik Franzén wrote: >> With this behavior you force the developer to use the exception class. >> You cannot use your own class because PHP will trigger an error if you do. >> >> However, you can o

[PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/xml compat.c expat_compat.h

2004-02-22 Thread Sebastian Bergmann
Christian Stocker wrote: > too bad, will try to find a solution for libxml2 < 2.6 What is the problem with requiring the version of libxml2 that is current when PHP 5 comes out? -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5

Re: [PHP-DEV] PHP5: Exceptions must valid objects that are derived from class Exception?

2004-02-22 Thread Markus Fischer
On Sun, Feb 22, 2004 at 05:44:43PM +0100, Erik Franzén wrote : > Markus Fischer wrote: > >The catch-all helps catching any type of exception, _given that_ it > >is derived from class Exception. The motivation behind it, and this > >makes sense to me, I'm pro this behaviour, is, that th

Re: [PHP-DEV] [PATCH] fix Warning in image2wbmp

2004-02-22 Thread Nuno Lopes
Sorry Ilia, but it isn't. Your change only sets the parameter to 0 when you specify an invalid threshold. When you don't specify the threshold, it will throw a warning because the default is -1 (invalid). Nuno > This is already addressed in CVS. > > Ilia > > On February 22, 2004 06:12 am, Nuno L

Re: [PHP-DEV] [PATCH] fix Warning in image2wbmp

2004-02-22 Thread Ilia Alshanetsky
This is already addressed in CVS. Ilia On February 22, 2004 06:12 am, Nuno Lopes wrote: > Hello, > > Here is a small patch to fix a warning in image2wbmp() when you call that > function without the optional parameters. > > > Nuno > > > - > reproduce script: > $image = ima

Re: [PHP-DEV] PHP5: Exceptions must valid objects that are derived from class Exception?

2004-02-22 Thread Derick Rethans
On Sun, 22 Feb 2004, [ISO-8859-1] Erik Franzén wrote: > With this behavior you force the developer to use the exception class. > You cannot use your own class because PHP will trigger an error if you do. > > However, you can of course extend the exception class with your own > class, but you canno

Re: [PHP-DEV] PHP5: Exceptions must valid objects that are derived from class Exception?

2004-02-22 Thread Erik Franzén
Markus Fischer wrote: The catch-all helps catching any type of exception, _given that_ it is derived from class Exception. The motivation behind it, and this makes sense to me, I'm pro this behaviour, is, that this way the interface of the Exception class is well defined. You can al

Re: [PHP-DEV] clone wars

2004-02-22 Thread Herr Witten
This was never resolved: Is this, or is this not a bug: class A { var $a; } $A = new A; $A->a = array(1); $array = &$A->a; $clone = clone $A; $clone->a = array(); //Affects a in $A. print_r($A); -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

Re: [PHP-DEV] Re: Static weirdness..

2004-02-22 Thread Herr Witten
Also, direct usage of classnames should be allowed, and in this case, the usual syntax should be used. ClassName->staticMethod(); On 22 Feb 2004, at 12:30 AM, Josh Fuhs wrote: $stringName::staticMethod(); -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://ww

Re: [PHP-DEV] PHP5: Exceptions must valid objects that are derived from class Exception?

2004-02-22 Thread Markus Fischer
On Sun, Feb 22, 2004 at 03:36:49PM +0100, Erik Franzén wrote : > I am prototyping on a PHP5 application using PEAR and I ran into a > strange error. > > if (PEAR::isError($mReturn)) { >throw $mReturn; > } > > PEAR is not configured to return exceptions instead of PEAR Errors and > the abov

[PHP-DEV] PHP5: Exceptions must valid objects that are derived from class Exception?

2004-02-22 Thread Erik Franzén
I am prototyping on a PHP5 application using PEAR and I ran into a strange error. if (PEAR::isError($mReturn)) { throw $mReturn; } PEAR is not configured to return exceptions instead of PEAR Errors and the above code will generate the following error if $mReturn is a PEAR Error. PHP Fatal e

[PHP-DEV] [PATCH] fix Warning in image2wbmp

2004-02-22 Thread Nuno Lopes
Hello, Here is a small patch to fix a warning in image2wbmp() when you call that function without the optional parameters. Nuno - reproduce script: Index: gd.c === RCS file: /repository/php-src/ext/gd/gd.c