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

2004-02-19 Thread Hartmut Holzgraefe
Greg Beaver wrote: Hi, I agree that allowing $a->bar() with a static method is too confusing, and should not be allowed. However, the ability to call a static method of an object (variable class name, in other words), is invaluable. What if PHP simply allowed $object::staticMethod() syntax? W

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

2004-02-19 Thread Lukas Smith
Hartmut Holzgraefe wrote: Greg Beaver wrote: Hi, I agree that allowing $a->bar() with a static method is too confusing, and should not be allowed. However, the ability to call a static method of an object (variable class name, in other words), is invaluable. What if PHP simply allowed $objec

[PHP-DEV] Re: Static weirdness..

2004-02-19 Thread Stephane Drouard
== Quote from Greg Beaver ([EMAIL PROTECTED])'s article > class foo { > static function bar() > { > echo 'hello'; > } > } > > $bar = 'hello'; > $a = new foo; > $a->bar(); // this could be disabled to error out easily > $a::bar(); // my patch now allows this to print "hello" >

Re: [PHP-DEV] Support for the RFC 2696 paged results LDAP extension

2004-02-19 Thread Wez Furlong
The best thing to do to get it in is to write a patch :-) Although the ldap extension is listed as being maintained, I don't think Stig Venaas has had much time for it in a while. The next best thing to writing a patch is showing some C code that shows how to do it--maybe someone will take it on.

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

2004-02-19 Thread Timm Friebe
On Wed, 2004-02-18 at 18:40, Hans Lellelid wrote: > Hi - [...] > foreach($entities as $ent) { > $peer = $ent->getPeer(); // e.g. might be BookPeer > $peer->doSelect(new Criteria()); //static: BookPeer::doSelect() > } $m= new Reflection_Method($ent->getPeer(), 'doSelect'); $m->invoke(NU

[PHP-DEV] CVS Account Request: sergiosgc

2004-02-19 Thread Sergio Carvalho
Adding of Structures::Structures_Graph to PEAR CVS. PEPr closed proposal page is here: http://pear.php.net/pepr/pepr-proposal-show.php?id=20 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] add fn_flags to getMethod() result (reflection)

2004-02-19 Thread Pierre-Alain Joye
Hello, Regarding the question about how to know if a method is declared static or not, I add the fn_flags to the result (flags property) of getMethod();. I tested it with PHP userland classes but not internal objects. This new property reflects the internal fn_flags in zend_function struct. The co

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

2004-02-19 Thread Marcus Boerger
Hello Hartmut, Thursday, February 19, 2004, 10:03:33 AM, you wrote: > Greg Beaver wrote: >> Hi, >> >> I agree that allowing $a->bar() with a static method is too confusing, >> and should not be allowed. However, the ability to call a static method >> of an object (variable class name, in othe

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

2004-02-19 Thread Pierre-Alain Joye
On Thu, 19 Feb 2004 15:49:42 +0100 Marcus Boerger <[EMAIL PROTECTED]> wrote: > A static and a non static member function are two absolute completley > different things. Anyway calling a static method from an instance as > $instance->staticmethod() or $instance::staticmethod() should be > allowed.

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

2004-02-19 Thread Derick Rethans
On Thu, 19 Feb 2004, Pierre-Alain Joye wrote: > On Thu, 19 Feb 2004 15:49:42 +0100 > Marcus Boerger <[EMAIL PROTECTED]> wrote: > > > A static and a non static member function are two absolute completley > > different things. Anyway calling a static method from an instance as > > $instance->staticm

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

2004-02-19 Thread Hartmut Holzgraefe
Marcus Boerger wrote: A static and a non static member function are two absolute completley different things. sure they are (in certain ways), but when *calling* them (from a class users point of view, not an implementors point of view) the only difference is that the static member is guaranteed t

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

2004-02-19 Thread Hartmut Holzgraefe
Pierre-Alain Joye wrote: One sure thing, $this should not be set in static methods. ACK -- Hartmut Holzgraefe <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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

2004-02-19 Thread Pierre-Alain Joye
On Thu, 19 Feb 2004 16:02:10 +0100 (CET) Derick Rethans <[EMAIL PROTECTED]> wrote: > But it should get set in non-static methods...which doesn't happen now > :) $this is set in non static methods if the method is called from an instance of the object and not set if called statically. It's exactly

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

2004-02-19 Thread Greg Beaver
Pierre-Alain Joye wrote: One sure thing, $this should not be set in static methods. I completely agree - the headache of fixing PEAR's "kind of static" methods is really annoying, and not really fixable. A method should either be static, non-static, or split into two methods, one that is st

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

2004-02-19 Thread Hans Lellelid
Timm Friebe wrote: On Wed, 2004-02-18 at 18:40, Hans Lellelid wrote: foreach($entities as $ent) { $peer = $ent->getPeer(); // e.g. might be BookPeer $peer->doSelect(new Criteria()); //static: BookPeer::doSelect() } $m= new Reflection_Method($ent->getPeer(), 'doSelect'); $m->invok

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

2004-02-19 Thread Marcus Boerger
Hello Pierre-Alain, Thursday, February 19, 2004, 4:10:09 PM, you wrote: > On Thu, 19 Feb 2004 16:02:10 +0100 (CET) > Derick Rethans <[EMAIL PROTECTED]> wrote: >> But it should get set in non-static methods...which doesn't happen now >> :) > $this is set in non static methods if the method is ca

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

2004-02-19 Thread Marcus Boerger
Hello Hans, Thursday, February 19, 2004, 4:14:53 PM, you wrote: > Timm Friebe wrote: >> On Wed, 2004-02-18 at 18:40, Hans Lellelid wrote: >> >>>foreach($entities as $ent) { >>> $peer = $ent->getPeer(); // e.g. might be BookPeer >>> $peer->doSelect(new Criteria()); //static: BookPeer::do

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

2004-02-19 Thread Pierre-Alain Joye
On Thu, 19 Feb 2004 16:21:50 +0100 Marcus Boerger <[EMAIL PROTECTED]> wrote: > But why the hell do you want a message, calling a static method from > anywhere is absolutley fine. This of course includes calling a static > method of an instance's class, however that is syntactically > accomplished.

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

2004-02-19 Thread Hartmut Holzgraefe
Pierre-Alain Joye wrote: And PEAR does not lead PHP devs but the counter, imho. it_sure_doesnt (althoughItWouldLikeTo) ;) -- Hartmut Holzgraefe <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] add fn_flags to getMethod() result (reflection)

2004-02-19 Thread Marcus Boerger
Hello Pierre-Alain, Thursday, February 19, 2004, 3:51:41 PM, you wrote: > Hello, > Regarding the question about how to know if a method is declared static > or not, I add the fn_flags to the result (flags property) of > getMethod();. I tested it with PHP userland classes but not internal > objec

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

2004-02-19 Thread Marcus Boerger
Hello Pierre-Alain, Thursday, February 19, 2004, 4:28:50 PM, you wrote: > On Thu, 19 Feb 2004 16:21:50 +0100 > Marcus Boerger <[EMAIL PROTECTED]> wrote: >> But why the hell do you want a message, calling a static method from >> anywhere is absolutley fine. This of course includes calling a stati

[PHP-DEV] Compile problems with OCI8 on Linux

2004-02-19 Thread David Giffin
I'm trying to compile the lastest snap shot 'php5-200402191630' with Red Hat Linux release 7.3 and am getting the following error: /usr/local/src/php5-200402191630/ext/oci8/oci8.c: In function `_oci_desc_flush_hash_dtor': /usr/local/src/php5-200402191630/ext/oci8/oci8.c:841: parse error before `*

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

2004-02-19 Thread Erik Franzén
Tobias Bradtke wrote: Is the fix applied in the current available snapshot (Win 32 package) from Feb 16, 2004 15:30 GMT? that snapshot did not work for me, but http://snaps.php.net/win32/php5-win32-200402181130.zip does fine. and there is also another new snapshot on http://snaps.php.net/ webwurs

Re: [PHP-DEV] Darwin (OSX) and shared modules

2004-02-19 Thread Dan Kalowsky
On Wed, 18 Feb 2004, TheSin wrote: > >> why is it doing this? something in the php imap build? or is it in the > >> uw-imap-c-client build? config option? Maybe all the above? > > > > It's your c-client build most likely. Hard to say since > > I don't know what version you have and how y

[PHP-DEV] PATCH: run-tests.php -l flag (local / non-recurisve)

2004-02-19 Thread Daniel Convissor
Hi: As you probably know, run-tests.php runs recursively through each subdirectory encountered. I've run into circumstances where it is helpful to have it just run files in the present directory, without recursion. I have created a patch which watches for an "-l" flag. The -l flag is similar

[PHP-DEV] PHP5 Win32 Build w/o XML Link Failure

2004-02-19 Thread Michael Sisolak
I'm trying to build a Win32 PHP5 without XML support (to determine how much of my 3+ megabyte php5ts.dll can be attributed to it). Using the latest snapshot (php5-200402191230) and this configure line: cscript //nologo configure.js --with-extra-includes=..\openssl-0.9.7c\include;..\iconv-1.9.1\in

Re: [PHP-DEV] PHP5 Win32 Build w/o XML Link Failure

2004-02-19 Thread Wez Furlong
We currently depend on the iconv symbols being found in our libxml. That error can probably be solved by disabling the iconv extension though. It is safe to ignore errors when nmaking clean. --Wez. - Original Message - From: "Michael Sisolak" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>

Re: [PHP-DEV] PHP5 Win32 Build w/o XML Link Failure

2004-02-19 Thread Michael Sisolak
Wez, Running with --without-iconv along with all the --without- does make the link work. When I run "nmake clean" is does remove the files in the root of the Release_TS directory, but it doesn't remove files from any of the extension specific directories, the SAPI directories, TSRM, or Zend (i.e.