[PHP-DEV] Re: more static method fun

2004-03-02 Thread Greg Beaver
Hi, Rob Richards wrote: Within the dom extension there are a few methods which can be called both statically and off an instantiated object. The PEAR base class also has this design flaw in several methods. It has caused nothing but annoying and unfixable bugs. The only good solution is to red

[PHP-DEV] Adding a few debug helpers to php4.x

2004-03-02 Thread Todd Ruth
I work for a company that is using php and would like to contribute a few helper functions that we find useful. They are most helpful for anyone doing OO work (especially if using singletons) who isn't ready to move to php5. Two of the three are trivial to incorporate, but for the third I'm looking

[PHP-DEV] more static method fun

2004-03-02 Thread Rob Richards
It is currently impossible to call a true static method from within a class method. It lets a class method call any object method statically even when not defined as a static method. The static method being called inherits the $this from the encapsulating object. This may not be a big deal with

[PHP-DEV] CVS Account Request: haruki

2004-03-02 Thread Haruki Setoyama
My purpose is translation of the PEAR manual into Japanese, and mentemance of it. I did Japanese translation of PEAR manual with Mr. Jokagi since last year. and he suggest to me that I should apply the CVS account. So the parts I need access to is "peardoc". -- PHP Internals - PHP Runtime Dev

[PHP-DEV] Re: Cannot use foreach() with $this->my_iterator within a class

2004-03-02 Thread Philip Fletcher
Please ignore - this has been fixed somewhere between php5-200402260830 and php5-200403022230. Philip -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RE: Segfault in HEAD

2004-03-02 Thread Timm Friebe
On Mon, 2004-03-01 at 16:53, [EMAIL PROTECTED] wrote: > >This should be fixed now. Thanks for the short reproducing script. > > > >Andi > > I don't think, that it is fixed in latest cvs. > Simply changing the script to this, the problem/bug still exists: [...] $ cat destruct_segfault.php foo = fa

Re: [PHP-DEV] Memory leak with .=

2004-03-02 Thread Timm Friebe
On Tue, 2004-03-02 at 11:13, Andi Gutmans wrote: > Fixed. Verified. > Thanks for the reproducing case. You're welcome:) - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Bus Error in shutdown

2004-03-02 Thread Timm Friebe
On Tue, 2004-03-02 at 09:28, Andi Gutmans wrote: > This should be fixed now. Verified. - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Iterator Class/foreach Logic Flaw? (was: [PHP-DEV] Cannot use foreach() with $this->my

2004-03-02 Thread Philip Fletcher
> > You mean that the hasMore is being used just to > assure the current position is valid. While it should > be only used to confirm if there are more elements or > not. Right? > Absolutely. To avoid lots of confusion/bug reports, the current hasMore() should be renamed to isValid(). Philip

Re: [PHP-DEV] Serializer Bugs?

2004-03-02 Thread Adam Maccabee Trachtenberg
On Tue, 2 Mar 2004, Derick Rethans wrote: > On Tue, 2 Mar 2004, Adam Maccabee Trachtenberg wrote: > > > FYI: I'm getting lots of unserializer warnings with the latest CVS on > > Mac OS X. > > We have been having this for a lng time, it's safe to ignore. Cool. It must normally scroll by withou

Re: [PHP-DEV] Serializer Bugs?

2004-03-02 Thread Derick Rethans
On Tue, 2 Mar 2004, Adam Maccabee Trachtenberg wrote: > FYI: I'm getting lots of unserializer warnings with the latest CVS on > Mac OS X. We have been having this for a lng time, it's safe to ignore. Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http

[PHP-DEV] Serializer Bugs?

2004-03-02 Thread Adam Maccabee Trachtenberg
FYI: I'm getting lots of unserializer warnings with the latest CVS on Mac OS X. -adam -- [EMAIL PROTECTED] author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! standard/var_unserializer.lo var_unserializer.re: In function `php_var_unserialize': var_unserializer.re:336:

[PHP-DEV] Re: Iterator Class/foreach Logic Flaw? (was: [PHP-DEV] Cannot use foreach() with $this->my

2004-03-02 Thread Marc Dembogurski
Three elements array: Current value: one. Calling hasMore() : bool(true) Current value: two. Calling hasMore() : bool(true) Current value: three. Calling hasMore() : bool(true) - last row *should* return false. I see, You mean that the hasMore is being used just to assure the current positio

[PHP-DEV] Re: Iterator Class/foreach Logic Flaw? (was: [PHP-DEV] Cannot use foreach() with $this->my_iterator within a class)

2004-03-02 Thread Philip Fletcher
Hi Marc Please take a look at the thread headed 'Iterator Class/foreach Logic Flaw?' - you will find your hasMore() returns TRUE when place on the last element, but (in the exammple code below), there are only three elements - therefore when on the third element, hasMore() should return false...

Re: [PHP-DEV] Cleaning up the browscap mess

2004-03-02 Thread Stig S. Bakken
On Mon, 2004-03-01 at 09:16, Derick Rethans wrote: > On Sun, 29 Feb 2004, Rasmus Lerdorf wrote: > > > I would suggest as a first step to pull it out of ext/standard and create > > a pecl extension for it and second to go through and figure out if we can > > continue to use the ini parser for this,

Re: [PHP-DEV] Cannot use foreach() with $this->my_iterator within a class

2004-03-02 Thread Marc Dembogurski
Hi,     I used to implement the hasMore() method like this:     public function hasMore(){     if (key($this->container) === NULL ) return FALSE;     if ( (key($this->container)) <= (count($this->container)-1) )     {   return TRUE;     }else   return FALSE;   } And I think that is what

Re: [PHP-DEV] Perl extension

2004-03-02 Thread Kai Schröder
On Tuesday 02 March 2004 18:45, Petras Kudaras wrote: > Well, Perl itself does not differentiate from "CPAN modules" or "any other > modules". Once you can load Perl modules and use the functions (or methods, > for that matter), you can use any Perl code, and you are not restricted to > CPAN. Yes,

Re: [PHP-DEV] bug in tokenizer.c, missing T_CLONE stuff

2004-03-02 Thread Derick Rethans
On Tue, 2 Mar 2004, Greg Beaver wrote: > Hi all, > > Could someone apply this patch to tokenizer.c? Done Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Perl extension

2004-03-02 Thread Petras Kudaras
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kai Schröder wrote: | On Monday 01 March 2004 23:10, Andi Gutmans wrote: | |>Hey, |>As some of you might have noticed, Dmitry worked on a Perl extension which |>allows PHP to run Perl scripts as well as instantiate Perl objects in PHP |>and use them. |

[PHP-DEV] bug in tokenizer.c, missing T_CLONE stuff

2004-03-02 Thread Greg Beaver
Hi all, Could someone apply this patch to tokenizer.c? Thanks Greg Index: ext/tokenizer/tokenizer.c === RCS file: /repository/php-src/ext/tokenizer/tokenizer.c,v retrieving revision 1.26 diff -u -r1.26 tokenizer.c --- ext/tokenizer

Re: [PHP-DEV] Perl extension

2004-03-02 Thread Kai Schröder
On Monday 01 March 2004 23:10, Andi Gutmans wrote: > Hey, > As some of you might have noticed, Dmitry worked on a Perl extension which > allows PHP to run Perl scripts as well as instantiate Perl objects in PHP > and use them. Intresting idea, but I have some questions: - Should ext/perl "only" br

Re: [PHP-DEV] Perl extension

2004-03-02 Thread Vlad Bosinceanu
Yes, but not with plain functions and perl_eval(). perl_call("func", $arg1, $arg2); Dmitry. What about perl_eval("func", PERL_CONTEXT_WHATEVER, $arg1, ...)? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] CVS Account Request: firman

2004-03-02 Thread Firman Wandayandi
1. I plan to constributing to PHP and PEAR 2. I want to donating my intellectual for the people 3. I want reporting bugs, if I found it. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Perl extension

2004-03-02 Thread Dmitry Stogov
> The following could maybe be made to work: > $x->void->f(); > $x->scalar->f() > $x->array->f() > > Andi Yes, but not with plain functions and perl_eval(). perl_call("func", $arg1, $arg2); Dmitry. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.n

Re: [PHP-DEV] Parse error in parsedate.y

2004-03-02 Thread Jan Schneider
Zitat von Derick Rethans <[EMAIL PROTECTED]>: On Tue, 2 Mar 2004, Edin Kadribasic wrote: Same problem on win32 snap box which used to work fine. bison version is 1.75. Should be fixed in CVS now. Yeah, works again, thanks. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - N

[PHP-DEV] Cannot use foreach() with $this->my_iterator within a class

2004-03-02 Thread Philip Fletcher
The following code attempts to use a class's iterator member with foreach. This code will not run unless you comment out the offending foreach (marked '** Comment out the next three lines...'). As demonstrated, it is possible to get() the iterator class and run it using foreach() externally or to

Re: [PHP-DEV] Parse error in parsedate.y

2004-03-02 Thread Derick Rethans
On Tue, 2 Mar 2004, Edin Kadribasic wrote: > Same problem on win32 snap box which used to work fine. bison version is > 1.75. Should be fixed in CVS now. Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Parse error in parsedate.y

2004-03-02 Thread Jan Schneider
Zitat von Jan Lehnardt <[EMAIL PROTECTED]>: Hi Jan, On 2 Mar 2004, at 12:25, Jan Schneider wrote: bison -y /home/jan/cvs/php5/ext/standard/parsedate.y -o /home/jan/cvs/php5/ext/standard/parsedate.c /home/jan/cvs/php5/ext/standard/parsedate.y:389.12: parse error, unexpected ":", expecting ";" or "|

Re: [PHP-DEV] Parse error in parsedate.y

2004-03-02 Thread Edin Kadribasic
Same problem on win32 snap box which used to work fine. bison version is 1.75. Edin - Original Message - From: "Jan Lehnardt" <[EMAIL PROTECTED]> To: "Jan Schneider" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, March 02, 2004 12:41 PM Subject: Re: [PHP-DEV] Parse error in p

[PHP-DEV] PHP5 Java

2004-03-02 Thread Jakes
Does anybody know whats happen to the java extension in version 5. Has it been broken?

Re: [PHP-DEV] Parse error in parsedate.y

2004-03-02 Thread Jan Lehnardt
Hi Jan, On 2 Mar 2004, at 12:25, Jan Schneider wrote: bison -y /home/jan/cvs/php5/ext/standard/parsedate.y -o /home/jan/cvs/php5/ext/standard/parsedate.c /home/jan/cvs/php5/ext/standard/parsedate.y:389.12: parse error, unexpected ":", expecting ";" or "|" make: *** [/home/jan/cvs/php5/ext/standard

[PHP-DEV] Parse error in parsedate.y

2004-03-02 Thread Jan Schneider
bison -y /home/jan/cvs/php5/ext/standard/parsedate.y -o /home/jan/cvs/php5/ext/standard/parsedate.c /home/jan/cvs/php5/ext/standard/parsedate.y:389.12: parse error, unexpected ":", expecting ";" or "|" make: *** [/home/jan/cvs/php5/ext/standard/parsedate.c] Fehler 1 Jan. -- http://www.horde.org -

[PHP-DEV] Re: make install leaks "like hell"

2004-03-02 Thread Andi Gutmans
Yep I know... At 11:22 AM 3/2/2004 +0100, Derick Rethans wrote: Hello, During make install I see the following leaks: /dat/dev/php/php-5.0dev/Zend/zend_execute.c(3644) : Freeing 0x40A1B9FC (44 bytes), script=/dat/dev/php/php-5.0dev/pear/install-pear.php /dat/dev/php/php-5.0dev/

[PHP-DEV] make install leaks "like hell"

2004-03-02 Thread Derick Rethans
Hello, During make install I see the following leaks: /dat/dev/php/php-5.0dev/Zend/zend_execute.c(3644) : Freeing 0x40A1B9FC (44 bytes), script=/dat/dev/php/php-5.0dev/pear/install-pear.php /dat/dev/php/php-5.0dev/Zend/zend_variables.c(148) : Actual location (location was relay

Re: [PHP-DEV] Memory leak with .=

2004-03-02 Thread Andi Gutmans
Fixed. Thanks for the reproducing case. At 11:25 PM 2/27/2004 +0100, Timm Friebe wrote: The following script: public function append($string) { $this->buf.= ($string instanceof StringBuffer ? $string->buf : $string ); } } $s= new StringBuffer(); $s->appen

Re: [PHP-DEV] Bus Error in shutdown

2004-03-02 Thread Andi Gutmans
This should be fixed now. There still is a problem with SimpleXML iterators. They might have to be fixed due to the changes in foreach(). Andi At 08:43 AM 2/26/2004 +0100, Timm Friebe wrote: On Thu, 2004-02-26 at 08:13, Andi Gutmans wrote: > Please let me know when you are able to reproduce it.

Re: [PHP-DEV] Perl extension

2004-03-02 Thread Andi Gutmans
At 08:48 AM 3/2/2004 +0100, Piotr Klaban wrote: On Tue, Mar 02, 2004 at 12:10:51AM +0200, Andi Gutmans wrote: > $x = new Perl("Test"); > $y = new PerlScalar($x); The above could generate mistakes. It is better to use perl_wantarray(something) or perl_wantarray(); something;. > Any ideas or suggesti