[PHP-DEV] Re: static/object method

2004-06-24 Thread Taco van den Broek
Hans Lellelid wrote: Hi all, I have a pattern I'm trying to implement in PHP5 using a class that could be called statically or non-statically. Perhaps "pattern" gives this too much legitimacy :) I can't figure out how to do this & wanted to ask if a) it's possible at all and b) if there's been

Re: [PHP-DEV] Re: static/object method

2004-06-24 Thread Alan Knowles
the E_STRICT warnings on static calls to non static methods are probably usefull, (as $this could be defined totally randomly), so it does make some sense.. btw: does that mean: class a { function find() { } } class b extends a { function find() { } } // call the toplevel parent method.. (skip t

RE: [PHP-DEV] Re: keyword arguments?

2004-06-24 Thread Richard Mann
>pretty soon you have function calls that look like this: > >xyz('a', 2, $foo, '', '', '', '', '', '', $bar); I agree with this. I am working on a project where by the flexibility required of the object being written has spawned a massive collection of parameters. Many of these parameters are only

Re: [PHP-DEV] Bug 28879: Populating arrays with resources and objects as offsets

2004-06-24 Thread Andi Gutmans
Maybe we should move this to an E_STRICT? E_WARNING is more consistent with existing warnings but I wouldn't want to be over strict, especially when making this change a couple of weeks before release. We could escalate the warning for 5.1 if we feel we need to do so. Andi At 11:33 AM 6/24/2004

Re: [PHP-DEV] Re: keyword arguments?

2004-06-24 Thread Jevon Wright
Wouldn't a good (not necessarily better) idea in your case be to use an object? Instead of function foo(named $a, named $b, named $c, named $d, ..., named $z) echo foo(a := $a, c := $c, e := $e, ...); you'd have class Foo { ... } $f = new Foo(); $f->setA($a); $f->setC($c);

Re: [PHP-DEV] Workarounds for PHP5 on Mac OS X

2004-06-24 Thread Marcus Bointon
on 21/6/04 10:56, Matthew Boehm at [EMAIL PROTECTED] wrote: > libxml2 comes with Mac 10.3.2 but its version is less than 2.5.10 (It's > 2.5.4 in /usr/include/libxml2/libxml) > > I downloaded newest source from xmlsoft.org and it compiled perfectly with > no modifications into /usr/local/lib/ Jus

[PHP-DEV] idate problems

2004-06-24 Thread Nuno Lopes
Hello, I've already reported this to the list some time ago, but nobody answered me until now. I think that the idate function has two little problems: 1) (i)date('L') should return the same (1 if is leap year, 0 otherwise), but they aren't outputing the same echo date('L'); //1 echo idate('L');

Re: [PHP-DEV] Re: static/object method

2004-06-24 Thread Hans Lellelid
Alan Knowles wrote: the E_STRICT warnings on static calls to non static methods are probably usefull, (as $this could be defined totally randomly), so it does make some sense.. btw: does that mean: class a { function find() { } } class b extends a { function find() { } } // call the toplevel par

[PHP-DEV] Re: static/object method

2004-06-24 Thread Hans Lellelid
Taco Van Den Broek wrote: > Hans Lellelid wrote: >> static, default behavior, probably accounts for 80% of uses: >> >> $c = new Criteria(Author::NAME, "Leo"); >> $a = AuthorFinder::find($c); > > > You pass your criteria to your search class as instantiated objects, why > don't you pass your paramet

[PHP-DEV] __Destruct() functionality

2004-06-24 Thread Gareth Ardron
ok, If this is fixed in cvs, I appologise - google wasn't suggesting that this has come up before. I've just been playing around with the __destruct() function a little bit, and seeing exactly what I could do with it. Basically, I have a company info class, and a logger class. The logger clas

RE: [PHP-DEV] Re: keyword arguments?

2004-06-24 Thread Richard Mann
>Instead of >function foo(named $a, named $b, named $c, named $d, ..., named $z) >echo foo(a := $a, c := $c, e := $e, ...); > >you'd have >class Foo { ... } >$f = new Foo(); >$f->setA($a); >$f->setC($c); >$f->setE($e); >... >echo $f->doit(); This could be done,

[PHP-DEV] Re: idate problems

2004-06-24 Thread Christian Schneider
Nuno Lopes wrote: 1) (i)date('L') should return the same (1 if is leap year, 0 otherwise), but they aren't outputing the same echo date('L'); //1 echo idate('L'); //0 Yes, this is indeed a bug in the isleap macro (you needed to call it with double parens), the fix is diff -u -r1.120 datetime.c --

[PHP-DEV] issue in copying the hash table(Reposted)

2004-06-24 Thread Kamesh Jayachandran
Hi All, Sorry to repost. I want the clarification regarding copying the global_class_table to thread specific compiler_globals->class_table in compiler_globals_ctor in Zend/zend.c. According to me memcpy should copy 'whatever source points to' to 'destination'. Our class_table hashtable structure

[PHP-DEV] About bug 27515 and 28343

2004-06-24 Thread Qingfeng Pan
I think the new Apache2 FastCGI module can fix the problems, the submitter should take a try... -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP5 RC3

2004-06-24 Thread Derrell . Lipman
Regarding upgrading sqlite to version 2.8.14, I previously wrote: > A unified diff against HEAD is attached. I haven't heard anything back on this and I don't want it to get too close to release time, so I'm just querying status. Is there anything further I can/should do to help get sqlite 2.8.

Re: [PHP-DEV] PHP5 RC3

2004-06-24 Thread Ilia Alshanetsky
Just applying the patch as you've suggested will cause problems as the PHP tree have some fixes inside libsqlite that were not yet (or never even submitted) added to the external library. Ilia On June 21, 2004 02:52 pm, [EMAIL PROTECTED] wrote: > This is a resend of the following message but wi

Re: [PHP-DEV] PHP5 RC3

2004-06-24 Thread Derrell . Lipman
Ilia Alshanetsky <[EMAIL PROTECTED]> writes: > Just applying the patch as you've suggested will cause problems as the PHP > tree have some fixes inside libsqlite that were not yet (or never even > submitted) added to the external library. I've been using a patched php5-rc2 with sqlite-2.8.13 fo

Re: [PHP-DEV] PHP5 RC3

2004-06-24 Thread Ilia Alshanetsky
On June 24, 2004 09:34 am, [EMAIL PROTECTED] wrote: > Ilia Alshanetsky <[EMAIL PROTECTED]> writes: > > Just applying the patch as you've suggested will cause problems as the > > PHP tree have some fixes inside libsqlite that were not yet (or never > > even submitted) added to the external library.

RE: [PHP-DEV] PHP5 RC3

2004-06-24 Thread Steph
Hey Ilia, if I don't understand why you aren't helping, Derrell sure as heck won't! Has he updated the actual 2.8.14 library as opposed to the bundled lib, is that the problem? Aha! Wez just went by, saying 'SQLite update? It's mostly done, it can go in when I have inet access'. Better lend him

Re: [PHP-DEV] Bug 28879: Populating arrays with resources and objects as offsets

2004-06-24 Thread Sara Golemon
> Maybe we should move this to an E_STRICT? E_WARNING is more consistent with > existing warnings but I wouldn't want to be over strict, especially when > making this change a couple of weeks before release. > We could escalate the warning for 5.1 if we feel we need to do so. > While I have ala

Re: [PHP-DEV] Bug 28879: Populating arrays with resources and objects as offsets

2004-06-24 Thread Daniel Convissor
Hi: On Thu, Jun 24, 2004 at 11:33:54AM +1000, Aidan Lister wrote: > > But since there's no BC need to allow resources in array initialization, > > then sure, leave it to the scripter to cast it to an int if that's REALLY > > what they want. (Again "why?" comes to mind). > > PEAR::DB uses this met

RE: [PHP-DEV] Re: keyword arguments?

2004-06-24 Thread Daniel Crookston
Okay, so keyword arguments probably won't be implemented. "Ice cube's chance in hell" is the phrase I recall being thrown around. I have two questions: 1. Why not? 2. Where do I start with my own copy of PHP to put it in? (The reason I asked about it initially is that I thought it'd be a fun

RE: [PHP-DEV] keyword arguments?

2004-06-24 Thread Jason Garber
Hello, I've been following this thread since it started... In my years of PHP programming, I never had a problem with passing an array to a function and using it's keys. If this is about not typing array(), then I must say I strongly disagree with the proposal. Shoot, with arrays, it's simple

[PHP-DEV] php5 and bundled extensions vs PECL

2004-06-24 Thread Curt Zirzow
I noticed that the zip extension is no longer in the cvs tree. Am I correct in thinking that it has been moved out of the bundled package of php and into PECL? Is there a list of extensions that have been moved that I can obtain, so the documentation can reflect that change? Curt -- First, let