[PHP-DEV] Static weirdness..

2004-02-17 Thread John Coggeshall
http://bugs.php.net/bug.php?id=27304 Marcus says he's brought this up before, and i think it really needs to be addressed before PHP 5 so I'm bringing it up again. I am told that currently we are allowing static methods to be called from an object context because of a performance hit if we check e

Re: [PHP-DEV] Re: About bug #26753 and zend_register_list_destructors()

2004-02-17 Thread Wez Furlong
I think ext/soap uses those resources as part of the legacy hack to store data in an object using integer member names. The real fix is to port it to PHP 5 OO api and make those things members of a real C structure. --Wez. - Original Message - From: "Andi Gutmans" <[EMAIL PROTECTED]> To

Re: [PHP-DEV] Re: About bug #26753 and zend_register_list_destructors()

2004-02-17 Thread Andi Gutmans
At 08:20 AM 2/18/2004 +0200, Jani Taskinen wrote: On Wed, 18 Feb 2004, Andi Gutmans wrote: >At 12:01 AM 2/18/2004 +0200, Jani Taskinen wrote: >> >That's fine. I thought you meant to make register_list_destructors() call >> >register_list_destructors_ex(). >> >> It seems that nuking is out of q

Re: [PHP-DEV] Re: About bug #26753 and zend_register_list_destructors()

2004-02-17 Thread Jani Taskinen
On Wed, 18 Feb 2004, Andi Gutmans wrote: >At 12:01 AM 2/18/2004 +0200, Jani Taskinen wrote: >> >That's fine. I thought you meant to make register_list_destructors() call >> >register_list_destructors_ex(). >> >> It seems that nuking is out of question and not very good idea after >> all. ;) >

Re: [PHP-DEV] Re: About bug #26753 and zend_register_list_destructors()

2004-02-17 Thread Andi Gutmans
At 12:01 AM 2/18/2004 +0200, Jani Taskinen wrote: >That's fine. I thought you meant to make register_list_destructors() call >register_list_destructors_ex(). It seems that nuking is out of question and not very good idea after all. ;) Using zend_register_list_destructors() (or the macro,

Re: [PHP-DEV] Re: PHP5beta4: Problem using extensions or include - latest snapshot

2004-02-17 Thread Erik Franzén
Jani Taskinen wrote: On Mon, 16 Feb 2004, Tobias Bradtke wrote: Erik franzén wrote: I am trying to get PHP5beta4 work on my Win XP Pro machine as a module in apache 1.3.29. When I am starting apache I am getting an error saying that php5ts.dll has crashed. This happens when: a) When I enable an

[PHP-DEV] Memory Leaks in Win32 PHP 5.0.0b4

2004-02-17 Thread Michael Sisolak
I've found two small memory leaks in PHP 5.0.0b4 release when running under Win32 (patches attached). 1) The ISAPI doesn't call sapi_shutdown() so the known_post_content_types hash tables doesn't get freed. 2) In virtual_file_ex (TSRM/tsrm_virtual_cwd.c, line 292) the Win32 API function GetLongPa

Re: [PHP-DEV] Re: About bug #26753 and zend_register_list_destructors()

2004-02-17 Thread Jani Taskinen
On Tue, 17 Feb 2004, Andi Gutmans wrote: >At 11:36 AM 2/17/2004 +0200, Jani Taskinen wrote: > >> > >> >I don't understand. Why fix it in PHP 5 if you're suggesting to nuke the >> >function? :) >> >> I was thinking backwards. Nevermind. So nuke in PHP5, fix in PHP4. > >Yeah I agree. We should c

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Marcus Boerger
Hello Hans, Tuesday, February 17, 2004, 10:43:41 PM, you wrote: > Hi- > Cristiano Duarte wrote: >> >>>I still think that interfaces should follow the same behavior as classes >>>(i.e. if you can override in classes you can override in interfaces), >>>but I understand that academically this is w

[PHP-DEV] mysqli_fetch() return values

2004-02-17 Thread Adam Maccabee Trachtenberg
I would like to propose a change in how mysqli_fetch() signifies "no more data." It should return NULL instead of MYSQLI_NO_DATA (a positive value) because it leads to cleaner PHP code and is more consistent with other MySQL fetch functions. Currently, mysqli_fetch() returns one of three different

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Hans Lellelid
Hi- Cristiano Duarte wrote: I still think that interfaces should follow the same behavior as classes (i.e. if you can override in classes you can override in interfaces), but I understand that academically this is wrong. Of course overriding is wrong period, but it's the route you have to take w

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Cristiano Duarte
Hi Hans, On Tue, 17 Feb 2004 15:44:38 -0500, Hans Lellelid wrote: > Ok, I guess that's just how it is in PHP. The only thing I would cling > to is that this behavior is inconsistent with the way classes behave: > i.e. you can override a method in a class and the ($obj instanceof > ParentClass) w

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Hans Lellelid
Hi - Cristiano Duarte wrote: On Tue, 17 Feb 2004 15:34:11 +, Stephane Drouard wrote: Hans, In PHP you are not allowed to explicit overload methods. Ex: class A { function x($a1) {} function x($a1, $a2) {} } The function "x" is already defined and explicit overloading is not

[PHP-DEV] Calling methods of parent/ancestor classes in PHP5

2004-02-17 Thread Brad Fisher
Since you can no longer assign to $this in PHP5, how would one call a method defined in a particular ancestor class that has been overridden by the current class or a more recent ancestor? In PHP4 doing this was hackish, but worked. For example: class A { function foo() { echo "A::foo";

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Cristiano Duarte
On Tue, 17 Feb 2004 15:34:11 +, Stephane Drouard wrote: Hans, In PHP you are not allowed to explicit overload methods. Ex: class A { function x($a1) {} function x($a1, $a2) {} } The function "x" is already defined and explicit overloading is not possible, so the code above w

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Marcus Boerger
Hello Hans, Tuesday, February 17, 2004, 2:59:26 PM, you wrote: > Andi Gutmans wrote: >> It depends what you call different signature. If you are talking about >> default arguments, we should consider allowing those as they don't >> change the isA relationship. However, if you want us to allow

[PHP-DEV] Problems linking C++ extension

2004-02-17 Thread Mark Spruiell
Hi, The header file Zend/zend_interfaces.h contains the following lines: ZEND_API zend_class_entry *zend_ce_traversable; ZEND_API zend_class_entry *zend_ce_aggregate; ZEND_API zend_class_entry *zend_ce_iterator; ZEND_API zend_class_entry *zend_ce_arrayaccess; These lines cause "multiple definiti

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c

2004-02-17 Thread Marcus Boerger
Hello Stephane, Tuesday, February 17, 2004, 10:57:02 AM, you wrote: > == Quote from Marcus Boerger ([EMAIL PROTECTED])'s article >> No those are read access members to private property members. When you lok >> at the exception class: >> php -r 'reflection_class::export("exception");' >> then yo

Re: [PHP-DEV] segfault with iterators

2004-02-17 Thread Pierre-Alain Joye
Hello, On Tue, 17 Feb 2004 08:17:54 -0500 "Rob Richards" <[EMAIL PROTECTED]> wrote: > I ran into this with simplexml but am able to reproduce with userland > classes. > > The segfault only occurs when the property in question does not exist, > no __get and __set methods implemented (if either is

Re: [PHP-DEV] Re: Statics and PHP5

2004-02-17 Thread Adam Bregenzer
On Tue, 2004-02-17 at 06:07, Derick Rethans wrote: > I don't want to plug anything, but have a look at www.vl-srm.net; it > tries to achive this (note: site is a bit outdated). You don't have to plugin anything, you can do it in PHP and the data storage method of your choice. Keep in mind that sr

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Ferdinand Beyer
On 17 Feb 2004 at 8:59, Hans Lellelid wrote: > interface IA { > function init(); > function doSomething($arg1,$arg2); > } > > interface IB { > funciton init(); > function doSomething($arg1, $arg2, $arg3, $arg4 = null); > function doSomethingElse($arg1); > } > > class A implements

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Stephane Drouard
== Quote from Hans Lellelid ([EMAIL PROTECTED])'s article > In more traditional PHP this works fine: > > class A { > function init() { ... } > function doSomething($arg1, $arg2) { ... } > } > > class B extends A { > function doSomething($arg1, $arg2, $arg3, $arg4 = null) { ... } > f

[PHP-DEV] schedule for 4.3.5 final

2004-02-17 Thread Daniel Convissor
Hi Folks: Didn't see any announcements on any of the mailing lists about 4.3.5RC3 coming out. Wondering what the schedule is for the final 4.3.5 release, please. Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Hans Lellelid
Andi Gutmans wrote: It depends what you call different signature. If you are talking about default arguments, we should consider allowing those as they don't change the isA relationship. However, if you want us to allow inheriting interfaces which truly differ in function prototypes than that

[PHP-DEV] segfault with iterators

2004-02-17 Thread Rob Richards
I ran into this with simplexml but am able to reproduce with userland classes. The segfault only occurs when the property in question does not exist, no __get and __set methods implemented (if either is implemented then no segfault), and is not being called off the initial object in the foreach.

[PHP-DEV] CVS Account Request: thessoro

2004-02-17 Thread Samuel Castillo Rogel
Translating PHP documentation (phpdoc-es) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] CVS Account Request: romain

2004-02-17 Thread romainBourdon
Hi, my name is Romain (Roms). I use PHP professionnaly since more than 3 years. I actively promote PHP in France threw several ways : - french websites : (phpteam.net phpfrance.com) - threw the AFUP wich organises the French PHP forum every year (with zeev this year) - creator of WAMP5 auto-i

Re: [PHP-DEV] Re: IException

2004-02-17 Thread Derick Rethans
On Tue, 17 Feb 2004, Stephane Drouard wrote: > The problem is not the name, but the fact that some people would like > to have an interface as the exception base hierarchy. Yes, and I think that's over-complicated, over-bloated and that it doesn't belong in PHP. You throw exceptions, you catch th

Re: [PHP-DEV] Re: Statics and PHP5

2004-02-17 Thread Derick Rethans
On Tue, 17 Feb 2004, Adam Bregenzer wrote: > Great response, you saved me a lot of typing. :) > > To add one thing, I have code that I use to easily persist an object > across a session, additionally it can save the class's static properties > (hacked into PHP4[1]). With this and my implementatio

Re: [PHP-DEV] Re: Statics and PHP5

2004-02-17 Thread Adam Bregenzer
On Tue, 2004-02-17 at 04:55, Stig S. Bakken wrote: > Hi Dave, > > I think I see what you're saying. Static class variables are associated > with the class, if the class persists between requests, so should its > static variables. [snip] > All of these basically keep the parsed representation of

Re: [PHP-DEV] Re: IException

2004-02-17 Thread Stephane Drouard
== Quote from Derick Rethans ([EMAIL PROTECTED])'s article > On Tue, 17 Feb 2004, Stanislav Malyshev wrote: > > > >> >Again, I don't see any complexity arising from this: The average user > > >> >would simply use "catch (IException $e)" instead of "catch (Exception > > > > That looks weird. Why IEx

Re: [PHP-DEV] Re: About bug #26753 and zend_register_list_destructors()

2004-02-17 Thread Andi Gutmans
At 11:36 AM 2/17/2004 +0200, Jani Taskinen wrote: > >I don't understand. Why fix it in PHP 5 if you're suggesting to nuke the >function? :) I was thinking backwards. Nevermind. So nuke in PHP5, fix in PHP4. Yeah I agree. We should commit the fix in PHP 4 and nuke in PHP 5. >> And change

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2

2004-02-17 Thread Adam Bregenzer
On Tue, 2004-02-17 at 00:24, Hans Lellelid wrote: > I agree with the basic premise the you want people to actually think > about the Exceptions they are catching. In general I think apps should > have their own exceptions and throw only Exceptions derived from those; > in practice, I'm sure the

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c

2004-02-17 Thread Stephane Drouard
== Quote from Marcus Boerger ([EMAIL PROTECTED])'s article > No those are read access members to private property members. When you lok > at the exception class: > php -r 'reflection_class::export("exception");' > then you'll encounter that you can overload __toString() and the > __construct(). O

Re: [PHP-DEV] Re: Statics and PHP5

2004-02-17 Thread Stig S. Bakken
Hi Dave, I think I see what you're saying. Static class variables are associated with the class, if the class persists between requests, so should its static variables. In the Java model of operation, it's natural to think in these terms, as the Java web server or application server is self-sust

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c

2004-02-17 Thread Stephane Drouard
== Quote from Marcus Boerger ([EMAIL PROTECTED])'s article > as i said before there is a reason for that: I played a long time with > exceptions until they became what they are right now. And and attempt > to increase the visibility of one of its members can be used to make it > SEGV. So i don't wa

Re: [PHP-DEV] Re: IException

2004-02-17 Thread Derick Rethans
On Tue, 17 Feb 2004, Stanislav Malyshev wrote: > >> >Again, I don't see any complexity arising from this: The average user > >> >would simply use "catch (IException $e)" instead of "catch (Exception > > That looks weird. Why IException? Ah, because it's an interface. And > what's an interface? And

[PHP-DEV] Re: IException

2004-02-17 Thread Stanislav Malyshev
>> >Again, I don't see any complexity arising from this: The average user >> >would simply use "catch (IException $e)" instead of "catch (Exception That looks weird. Why IException? Ah, because it's an interface. And what's an interface? And why should I know about interfaces if I just want to c

Re: [PHP-DEV] Re: Statics and PHP5

2004-02-17 Thread Derick Rethans
On Tue, 17 Feb 2004, Andi Gutmans wrote: > PHP is pretty much a stateless language. If you want to keep a state you're > going to have to serialize/unserialize to your harddisk or DB. There have > been attempts at creating something similar to an app server such as srm > but they never really took

Re: [PHP-DEV] Re: About bug #26753 and zend_register_list_destructors()

2004-02-17 Thread Jani Taskinen
On Tue, 17 Feb 2004, Andi Gutmans wrote: >At 06:03 PM 2/16/2004 +0200, Jani Taskinen wrote: >>On Mon, 16 Feb 2004, Andi Gutmans wrote: >> >> >It seems to me that the difference is in the dtor() callback's parameters. >> >I'm not sure why type_name is not passed to >> >zend_register_list_destructor

Re: [PHP-DEV] Re: About bug #26753 and zend_register_list_destructors()

2004-02-17 Thread Andi Gutmans
At 06:03 PM 2/16/2004 +0200, Jani Taskinen wrote: On Mon, 16 Feb 2004, Andi Gutmans wrote: >It seems to me that the difference is in the dtor() callback's parameters. >I'm not sure why type_name is not passed to >zend_register_list_destructors(). It probably did not exist when it was >originally w

Re: [PHP-DEV] Re: Statics and PHP5

2004-02-17 Thread Dave Peckham
Andi (and all), You are completely missing my point. I'm not looking for stateful storage of user variables. If a page creates an instance of the Person class and assigns it to $dave, then I expect $dave to go out of scope (and permanently disappear) at the end of the page request lifecycle--just

Re: [PHP-DEV] instanceof has higher precedence than casts

2004-02-17 Thread Andi Gutmans
I'll take a look at it. The patch seems to be OK. Thanks, Andi At 03:59 PM 2/16/2004 +0100, Jan Lehnardt wrote: Hi, some dude on IRC found out that php -r 'var_export((object)1 instanceof stdClass);'; results in class stdClass { public $scalar = false; } IMHO it should just return true. The ZE

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Andi Gutmans
It depends what you call different signature. If you are talking about default arguments, we should consider allowing those as they don't change the isA relationship. However, if you want us to allow inheriting interfaces which truly differ in function prototypes than that would definitely be

Re: [PHP-DEV] Re: Statics and PHP5

2004-02-17 Thread Andi Gutmans
At 10:13 AM 2/16/2004 -0800, Dave Peckham wrote: Hi all, My initial response to Jonathan has me thinking more about this, and a higher level. I guess I want to hear from the Zend guys about their intentions of PHP as an app server. IMHO, that's the right direction. For example, when PHP is loaded

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c

2004-02-17 Thread Andi Gutmans
At 04:13 PM 2/16/2004 +, Stephane Drouard wrote: > P.S. - BTW, why not call it IException (or ExceptionInterface) instead of > Throwable? I think for people who don't know Java, it makes more sense. Why not, but in that case, the other PHP interfaces should also follow this naming convention.

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c

2004-02-17 Thread Andi Gutmans
At 10:35 PM 2/16/2004 +0100, Timm Friebe wrote: On Mon, 2004-02-16 at 09:35, Andi Gutmans wrote: > Hey, > > Marcus didn't mean it adds complexity to the code but to PHP. I can't see how it would: For those relying on the built-in base class, it won't change a single thing. For those wanting their o