[PHP-DEV] Re: PHP 5.2.6RC5 windows build available

2008-04-30 Thread Holo
Elizabeth M Smith escreveu: Holo wrote: Rob Richards escreveu: A little late to the party, but the windows build for PHP 5.2.6RC5 is finally available. Please test it as much as possible. http://pecl2.php.net/downloads/php-windows-builds/qa/php-5.2.6RC5-Win32.zip http://pecl2.php.net/download

[PHP-DEV] Re: PHP 5.2.6RC5 windows build available

2008-04-30 Thread Elizabeth M Smith
Holo wrote: > Rob Richards escreveu: >> A little late to the party, but the windows build for PHP 5.2.6RC5 is >> finally available. Please test it as much as possible. >> >> http://pecl2.php.net/downloads/php-windows-builds/qa/php-5.2.6RC5-Win32.zip >> >> http://pecl2.php.net/downloads/php-windows-

Re: [PHP-DEV] PHP 5.2.6RC5 windows build available

2008-04-30 Thread Edward Z. Yang
Pierre Joye wrote: > http://pecl2.php.net/downloads/php-windows-builds/ Woohoo! That's pretty awesome! -- Edward Z. YangGnuPG: 0x869C48DA HTML Purifier Anti-XSS Filter [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]] -- PHP Internals

[PHP-DEV] Re: PHP 5.2.6RC5 windows build available

2008-04-30 Thread Holo
Rob Richards escreveu: A little late to the party, but the windows build for PHP 5.2.6RC5 is finally available. Please test it as much as possible. http://pecl2.php.net/downloads/php-windows-builds/qa/php-5.2.6RC5-Win32.zip http://pecl2.php.net/downloads/php-windows-builds/qa/php-debug-pack-5.2

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Stanislav Malyshev
Hi! In Child $foo is redefined without a getter-method. This breaks the How it's not "in Child the get method is inherited from Mother"? But suppose it is as you say. Yes, in this particular case it would be detected - however, it is not the code you brought in the last example, where the a

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Alain Williams
On Wed, Apr 30, 2008 at 10:42:04PM +0200, Keryx Web wrote: > Alain Williams skrev: > >Taking it a bit further, if the function returns a reference (eg to its > >argument): > > > > function int &myfunction(int &$param) > > > >Alternative could be: > > function &int myfunction(int &$param) >

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Keryx Web
Alain Williams skrev: Taking it a bit further, if the function returns a reference (eg to its argument): function int &myfunction(int &$param) Alternative could be: function &int myfunction(int &$param) But I think that the first form is better. From one whose job it is to d

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Lars Strojny
Am Mittwoch, den 30.04.2008, 12:25 -0700 schrieb Stanislav Malyshev: [...] > How? For that you'd need the interpreter to actually understand what the > code does. While I'd like to have such thing one day (provided it does > not rebel and decide to kill all humans, of course ;) PHP interpreter is

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Stanislav Malyshev
Hi! With the substantial difference, that __get()/__set() does not work properly with inheritance, as the language can't verify the LSP. Language never could verify the LSP. The developer should do it - the language has no idea of what pre/postconditions in your code are. Language can provid

Re: [PHP-DEV] Calling a class constructor

2008-04-30 Thread Antony Dovgal
On 30.04.2008 23:17, Lars Strojny wrote: Hi all, esp. Johannes, Am Mittwoch, den 30.04.2008, 13:05 -0400 schrieb Sam Barrow: [...] Still, that just seems unnecessary, I usually compile without the reflection stuff because i never use it. I'd like to be able to use this like call_user_func, I'm

Re: [PHP-DEV] Calling a class constructor

2008-04-30 Thread Lars Strojny
Hi all, esp. Johannes, Am Mittwoch, den 30.04.2008, 13:05 -0400 schrieb Sam Barrow: [...] > Still, that just seems unnecessary, I usually compile without the > reflection stuff because i never use it. I'd like to be able to use this > like call_user_func, I'm pretty much doing the same thing. Oh,

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Lars Strojny
Good evening Stas, Am Mittwoch, den 30.04.2008, 10:02 -0700 schrieb Stanislav Malyshev: [...] > You can easily do this by having __get call getProperty. That's like 1 > line of code to do. No language change needed. With the substantial difference, that __get()/__set() does not work properly wit

Re: [PHP-DEV] why interfaces ?

2008-04-30 Thread Robert Cummings
On Wed, 2008-04-30 at 10:21 -0600, Nathan Nobbe wrote: > all, > > in recent weeks there has been a lot of arguing about what interfaces are, > arent (on php-general and now on the internals list as well) etc. etc. > > i am quite curious, why interfaces were added to the language in the first > p

Re: [PHP-DEV] why interfaces ?

2008-04-30 Thread Jeremy Privett
Nathan Nobbe wrote: On Wed, Apr 30, 2008 at 12:06 PM, Jeremy Privett <[EMAIL PROTECTED]> wrote: Nathan Nobbe wrote: all, in recent weeks there has been a lot of arguing about what interfaces are, arent (on php-general and now on the internals list as well) etc. etc. i am quite curio

[PHP-DEV] Re: Help: call_user_function() core dumps

2008-04-30 Thread Johannes Schlüter
Hi, On Wed, 2008-04-30 at 09:52 -0700, Dhiru Pandey wrote: > I am new to PHP extension writing and embedding. Following the book from > Sara Goleman - Extending and Embedding PHP (Developer's Library) > I wrote the following program based on her example in Chap. 20 > > ===

Re: [PHP-DEV] why interfaces ?

2008-04-30 Thread Nathan Nobbe
On Wed, Apr 30, 2008 at 12:06 PM, Jeremy Privett <[EMAIL PROTECTED]> wrote: > Nathan Nobbe wrote: > >> all, >> >> in recent weeks there has been a lot of arguing about what interfaces are, >> arent (on php-general and now on the internals list as well) etc. etc. >> >> i am quite curious, why inter

Re: [PHP-DEV] why interfaces ?

2008-04-30 Thread Jeremy Privett
Nathan Nobbe wrote: all, in recent weeks there has been a lot of arguing about what interfaces are, arent (on php-general and now on the internals list as well) etc. etc. i am quite curious, why interfaces were added to the language in the first place. note, i am not criticizing them, i am ove

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Jeremy Privett
Stanislav Malyshev wrote: Hi! have plain properties that may contain everything. If we would have something like this: You can easily do this by having __get call getProperty. That's like 1 line of code to do. No language change needed. I don't know about you, but I'm not interested in tha

Re: [PHP-DEV] OS X, enable embed problem, patch

2008-04-30 Thread Christopher Thompson
Paul Biggar wrote: Hi Chris, I'm very interested in having --enable-embed working on OS X. My experience with libtool is that it abstracts this sort of thing, so I'm a little bit confused by your work-around. Could you explain why you added --enable-embed=dylib instead of fixing --enable-embed=s

Re: [PHP-DEV] OS X, enable embed problem, patch

2008-04-30 Thread Paul Biggar
Hi Chris, I'm very interested in having --enable-embed working on OS X. My experience with libtool is that it abstracts this sort of thing, so I'm a little bit confused by your work-around. Could you explain why you added --enable-embed=dylib instead of fixing --enable-embed=shared? Thanks, Paul

Re: [PHP-DEV] Calling a class constructor

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 19:09 +0200, Hannes Magnusson wrote: > On Wed, Apr 30, 2008 at 6:57 PM, Sam Barrow <[EMAIL PROTECTED]> wrote: > > create_new(string $class, array $constructor_args) > > > > Does anyone else see a need for this? > > No. > Have you considered subscribing to [EMAIL PROTECTED]

Re: [PHP-DEV] OS X, enable embed problem, patch

2008-04-30 Thread Christopher Thompson
Although there's obviously some debate as to the usefulness of my embed patch for OS X, here's a replacement for the Makefile.global bit. It adds $(PHP_LDFLAGS) to the compile line for libphp5.dylib, necessary in many cases. --- php-5.2.5.clean/Makefile.global 2007-08-03 08:01:56.

Re: [PHP-DEV] Re: RE : [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 09:26 -0700, Chris Stockton wrote: > Hello Sam. > > Would you agree in general the function int name() { syntax is > favored? If you need help working out the grammar for such changes let > me know. This is something that I think would add value to PHP as a > whole and would

Re: [PHP-DEV] Calling a class constructor

2008-04-30 Thread Hannes Magnusson
On Wed, Apr 30, 2008 at 6:57 PM, Sam Barrow <[EMAIL PROTECTED]> wrote: > create_new(string $class, array $constructor_args) > > Does anyone else see a need for this? No. Have you considered subscribing to [EMAIL PROTECTED] Could you please first direct these questions to php-general@ and gather

Re: [PHP-DEV] Calling a class constructor

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 10:03 -0700, Stanislav Malyshev wrote: > Hi! > > > create_new(string $class, array $constructor_args) > > You can create new object via ReflectionClass::newInstance. Still, that just seems unnecessary, I usually compile without the reflection stuff because i never use it. I

Re: [PHP-DEV] Re: RE : [PHP-DEV] Return type hinting patch

2008-04-30 Thread Chris Stockton
You have added is_int, is_numeric, and === operator. I've been reading your posts and you should really stop confusing using that argument. Truth is, types are relevant. $foo = 1; $bar = '1'; if($foo === $bar) { echo "I am never echo'ed"; } Until you make $foo === $bar, you should really sto

Re: [PHP-DEV] Calling a class constructor

2008-04-30 Thread Stanislav Malyshev
Hi! create_new(string $class, array $constructor_args) You can create new object via ReflectionClass::newInstance. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Stanislav Malyshev
Hi! have plain properties that may contain everything. If we would have something like this: You can easily do this by having __get call getProperty. That's like 1 line of code to do. No language change needed. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zen

[PHP-DEV] Calling a class constructor

2008-04-30 Thread Sam Barrow
Currently there is no way to call a class constructor using call_user_func or something similar, the only way is to use a reflection object which is useless overhead and takes a few lines of code. This would be very useful to be able to do create_new(string $class, array $constructor_args) Does

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Lars Strojny
Hi Stas, hi everbody, Am Dienstag, den 29.04.2008, 10:22 -0700 schrieb Stanislav Malyshev: [...] > In any case, whenever you want to write $foo->bar, just write > $foo->getBar() and $foo->setBar(), and it'd work :) I think the issue is, that PHP does not have defined properties with attached val

[PHP-DEV] Help: call_user_function() core dumps

2008-04-30 Thread Dhiru Pandey
I am new to PHP extension writing and embedding. Following the book from Sara Goleman - Extending and Embedding PHP (Developer's Library) I wrote the following program based on her example in Chap. 20 === #include #include #includ

[PHP-DEV] Re: RE : [PHP-DEV] Return type hinting patch

2008-04-30 Thread Stanislav Malyshev
Hi! Right, return type hinting is useless in such cases, but it is interesting when we check whether a method is compatible with an implemented interface or an extended/abstract class. In this case, When exactly you check that? PHP has no static type checking, and in runtime actual values, no

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Robert Cummings
On Wed, 2008-04-30 at 09:22 -0700, Chris Stockton wrote: > If you guys don't like the way interfaces work then do not use them. > If your going to talk about cycles, just lose the abstraction all > together. > > Important for some. You once again, with all your hand > flapping, as

Re: [PHP-DEV] Re: RE : [PHP-DEV] Return type hinting patch

2008-04-30 Thread Chris Stockton
Hello Sam. Would you agree in general the function int name() { syntax is favored? If you need help working out the grammar for such changes let me know. This is something that I think would add value to PHP as a whole and would not mind lending some time for. -Chris On Wed, Apr 30, 2008 at 4:51

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Chris Stockton
If you guys don't like the way interfaces work then do not use them. If your going to talk about cycles, just lose the abstraction all together. Important for some. You once again, with all your hand flapping, assume > we want some kind of operation on the data. If we do not, and this > happens a

[PHP-DEV] why interfaces ?

2008-04-30 Thread Nathan Nobbe
all, in recent weeks there has been a lot of arguing about what interfaces are, arent (on php-general and now on the internals list as well) etc. etc. i am quite curious, why interfaces were added to the language in the first place. note, i am not criticizing them, i am overjoyed that the langua

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Nathan Nobbe
On Wed, Apr 30, 2008 at 9:55 AM, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-04-30 at 09:39 -0600, Nathan Nobbe wrote: > > > > so really, all we would get is a group of member variables we know > > would be there... > > No, you know nothing about the existence of properties when us

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Robert Cummings
On Wed, 2008-04-30 at 09:39 -0600, Nathan Nobbe wrote: > > so really, all we would get is a group of member variables we know > would be there... No, you know nothing about the existence of properties when using getters and setters. Just because you have getColour() and setColour() in no way imp

Re: [PHP-DEV] Class Properties in Interfaces?

2008-04-30 Thread Nathan Nobbe
On Wed, Apr 30, 2008 at 12:01 AM, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-04-30 at 01:22 -0400, Nathan Nobbe wrote: > > On Wed, Apr 30, 2008 at 1:07 AM, Robert Cummings <[EMAIL PROTECTED]> > wrote: > > > > We are not talking about data here. We are talking about > >

Re: [PHP-DEV] OS X, enable embed problem, patch

2008-04-30 Thread Christopher Thompson
I don't want libphp.so as we are not using Apache. The brief details are roughly as follows: - we use lighthttpd for a web server - much of our site is in Php - we are transitioning to Ruby - we have a custom-written wrapper to allow Php to run inside of Ruby, to make the transition a little eas

[PHP-DEV] Re: [PHP-QA] Re: Little not about tests lenght

2008-04-30 Thread Pierre Joye
On Wed, Apr 30, 2008 at 4:14 PM, Derick Rethans <[EMAIL PROTECTED]> wrote: > On Wed, 30 Apr 2008, Ant Phillips wrote: > > > I've broken up the rename_variation-win32.phpt and rename_basic.phpt into a > > bunch of smaller tests which are hopefully more easily understood. There > > appears to be a

[PHP-DEV] Re: [PHP-QA] Re: Little not about tests lenght

2008-04-30 Thread Ant Phillips
I don't think so, on the latest 5.2 snap it just says the file exists and returns false. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: [PHP-QA] Re: Little not about tests lenght

2008-04-30 Thread Antony Dovgal
On 30.04.2008 18:14, Derick Rethans wrote: On Wed, 30 Apr 2008, Ant Phillips wrote: I've broken up the rename_variation-win32.phpt and rename_basic.phpt into a bunch of smaller tests which are hopefully more easily understood. There appears to be a problem with the php 5.3 branch when renaming

[PHP-DEV] Re: [PHP-QA] Re: Little not about tests lenght

2008-04-30 Thread Derick Rethans
On Wed, 30 Apr 2008, Ant Phillips wrote: > I've broken up the rename_variation-win32.phpt and rename_basic.phpt into a > bunch of smaller tests which are hopefully more easily understood. There > appears to be a problem with the php 5.3 branch when renaming an existing > file to an existing dir

[PHP-DEV] Re: RE : [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 12:58 +0200, LAUPRETRE François (P) wrote: > > From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] > > > First is that function > > definition and code is usually written by the same person in the same > > (very small) context, and this person has to be somewhat > > absent

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 08:27 +0100, Alain Williams wrote: > On Wed, Apr 30, 2008 at 09:23:17AM +0300, Arvids Godjuks wrote: > > I'm +1 for this syntax > > > > function int myfunction(int $param) > > { > > return $someint; > > } > > > > C/C++ like, easy to understand > > +1 -- least confusion

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 09:23 +0300, Arvids Godjuks wrote: > I'm +1 for this syntax > > function int myfunction(int $param) > { > return $someint; > } > > C/C++ like, easy to understand > > > And bad idea about making a return type "function" - looks very > useless and will not be used a lot

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
On Tue, 2008-04-29 at 22:13 -0400, Jessie Hernandez wrote: > Sam Barrow wrote: > > Well in summation I think this is something that should be implemented, > > I don't see any arguments against implementing this atleast for arrays > > and classes, like we already have for function parameters. > > >

Re: [PHP-DEV] [PATCH] More array filling optimizations

2008-04-30 Thread Dmitry Stogov
Matt Wilmas wrote: Hi again Dmitry, Hmm, if a -1 size was passed, I thought it would just make a huge array size (bad, obviously), but the tests would still work. (Or I guess it might exhaust memory_limit.) Anyway, the code for checking the size (length variable) in array_splice() is copied

Re: [PHP-DEV] [PATCH] More array filling optimizations

2008-04-30 Thread Matt Wilmas
Hi again Dmitry, Hmm, if a -1 size was passed, I thought it would just make a huge array size (bad, obviously), but the tests would still work. (Or I guess it might exhaust memory_limit.) Anyway, the code for checking the size (length variable) in array_splice() is copied from php_splice(), so m

Re: [PHP-DEV] [PATCH] More array filling optimizations

2008-04-30 Thread Dmitry Stogov
For some reason "make test" with the patch reported several broken array_splice() tests. Looking in gdb I saw that init_array() got -1 as a size of new array. I don't think checks for return_value_used for array_splice() have a lot of sense. Thanks. Dmitry. Matt Wilmas wrote: Hi Dmitry, Y

Re: [PHP-DEV] [PATCH] More array filling optimizations

2008-04-30 Thread Matt Wilmas
Hi Dmitry, Yes, I noticed similar results with the compile/vm changes, and was also thinking that it probably wasn't worth doing, so I just left it as a separate patch in case someone else wanted to look into it. :-) So I guess the rest is OK other than array_splice() tests breaking... I didn't

Re: [PHP-DEV] PHP 5.2.6RC5 windows build available

2008-04-30 Thread Richard Quadling
2008/4/30 Pierre Joye <[EMAIL PROTECTED]>: > hi, > > > On Wed, Apr 30, 2008 at 10:53 AM, Richard Quadling > <[EMAIL PROTECTED]> wrote: > > 2008/4/30 Pierre Joye <[EMAIL PROTECTED]>: > > > > > > > On Tue, Apr 29, 2008 at 11:58 PM, Rob Richards > > > <[EMAIL PROTECTED]> wrote: > > > > A l

Re: [PHP-DEV] PHP 5.2.6RC5 windows build available

2008-04-30 Thread Pierre Joye
hi, On Wed, Apr 30, 2008 at 10:53 AM, Richard Quadling <[EMAIL PROTECTED]> wrote: > 2008/4/30 Pierre Joye <[EMAIL PROTECTED]>: > > > > On Tue, Apr 29, 2008 at 11:58 PM, Rob Richards > > <[EMAIL PROTECTED]> wrote: > > > A little late to the party, but the windows build for PHP 5.2.6RC5 is > >

Re: [PHP-DEV] PHP 5.2.6RC5 windows build available

2008-04-30 Thread Richard Quadling
2008/4/30 Pierre Joye <[EMAIL PROTECTED]>: > On Tue, Apr 29, 2008 at 11:58 PM, Rob Richards > <[EMAIL PROTECTED]> wrote: > > A little late to the party, but the windows build for PHP 5.2.6RC5 is > > finally available. Please test it as much as possible. > > > > > http://pecl2.php.net/downloa

Re: [PHP-DEV] OS X, enable embed problem, patch

2008-04-30 Thread BuildSmart
This is taken care of by "auto" tools. If you are experiencing build issues of public releases then you're doing something wrong. I build PHP for a living in OS X and I've encountered no build issues what-so-ever related to building with dylib linking but the resulting binary will (should

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Alain Williams
On Wed, Apr 30, 2008 at 09:23:17AM +0300, Arvids Godjuks wrote: > I'm +1 for this syntax > > function int myfunction(int $param) > { > return $someint; > } > > C/C++ like, easy to understand +1 -- least confusion to most people. Taking it a bit further, if the function returns a reference

Re: [PHP-DEV] [PATCH] More array filling optimizations

2008-04-30 Thread Dmitry Stogov
Hi Matt, I've made a review of your patch. At first it has a bug at least in array_psplice() that makes several tests to fail. So I removed the whole ext/standard part and tested only Zend Engine changes. Although the idea is interesting and implementation is perfect, the patch doesn't make

Re: [PHP-DEV] OS X, enable embed problem, patch

2008-04-30 Thread Alexey Zakhlestin
shouldn't autotools take care about these differences? On 4/30/08, Christopher Thompson <[EMAIL PROTECTED]> wrote: > Please be gentle, I have very little experience developing on OS X. To be > honest, the whole dylib thing seems messy and confusing to me, compared to > the fairly straight-forward