Re: [PHP-DEV] Mail function undefined in PHP6

2007-03-18 Thread Antony Dovgal
On 03/18/2007 12:32 PM, Tijnema ! wrote: On 3/18/07, Mike Robinson <[EMAIL PROTECTED]> wrote: Tijnema ! > Well, i installed sendmail 8.14.0, and it did install the > sendmail binary into /usr/sbin/sendmail, and configure could > find it, so i recompiled/reinstalled PHP and now it still > can't f

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-03-18 Thread Marcus Boerger
Hello Wez, interesting solution. Nice work:-) Monday, March 19, 2007, 1:48:31 AM, you wrote: > Updated patch at http://pastebin.ca/400952 > Not 100% sure if my hack in zend_compile.c is righteous, but it > doesn't seem too far wrong. > --Wez. Best regards, Marcus -- PHP Internals - P

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-03-18 Thread Marcus Boerger
Hello Gwynne, Monday, March 19, 2007, 3:13:28 AM, you wrote: > On Mar 18, 2007, at 9:30 PM, Wez Furlong wrote: >> Your nitpicking happens to be wrong ;-) >> >> sizeof("string constant") is the "same" as strlen("string constant") >> +1, but is resolved at compile time, so we use sizeof("string

Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-18 Thread Stanislav Malyshev
I didn't make it do anything fancy with scoping; it would make the implementation more complicated, and wouldn't fit so well with the way that scoping works in PHP, in that you need to explicitly reference the global scope to "break out" of your function scope. It would be cool if the lexical

Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-18 Thread Wez Furlong
I didn't make it do anything fancy with scoping; it would make the implementation more complicated, and wouldn't fit so well with the way that scoping works in PHP, in that you need to explicitly reference the global scope to "break out" of your function scope. It would be cool if the lexic

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-03-18 Thread Gwynne
On Mar 18, 2007, at 9:30 PM, Wez Furlong wrote: Your nitpicking happens to be wrong ;-) sizeof("string constant") is the "same" as strlen("string constant") +1, but is resolved at compile time, so we use sizeof("string constant")-1 to get a compile time evaluated strlen(). This trick is us

Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-18 Thread Stanislav Malyshev
$data = array("zoo", "orange", "car", "lemon", "apple"); usort($data, function($a, $b) { return strcmp($a, $b); }); var_dump($data); # data is sorted alphabetically What happens if you do this: $data = array("zoo", "orange", "car", "lemon", "apple"); $rev = 1; usort($data, function($a, $b) { re

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-03-18 Thread Wez Furlong
Your nitpicking happens to be wrong ;-) sizeof("string constant") is the "same" as strlen("string constant") +1, but is resolved at compile time, so we use sizeof("string constant")-1 to get a compile time evaluated strlen(). This trick is used throughout the PHP internals. --Wez. On Mar

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-03-18 Thread Gwynne
On Mar 18, 2007, at 8:48 PM, Wez Furlong wrote: Updated patch at http://pastebin.ca/400952 Not 100% sure if my hack in zend_compile.c is righteous, but it doesn't seem too far wrong. 74. + if (!memcmp(opline- >op2.u.constant.value.str.val, "__zend_anon_", sizeof ("__ze

[PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-03-18 Thread Wez Furlong
Updated patch at http://pastebin.ca/400952 Not 100% sure if my hack in zend_compile.c is righteous, but it doesn't seem too far wrong. --Wez. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-03-18 Thread Jim Wilson
> So, the question is, do we want this in PHP? yes, please. Anonymous function declaration is one of the things I've always loved in Ruby and JavaScript - I for one would _love to see this_ in php. -- Jim R. Wilson (jimbojw) On 3/18/07, Wez Furlong <[EMAIL PROTECTED]> wrote: I found another

[PHP-DEV] Re: PATCH: anonymous functions in PHP

2007-03-18 Thread Wez Furlong
I found another flaw; when used in a loop it keeps trying to declare the same function over and over. I think this is because the ZEND_DECLARE_FUNCTION opcode is emitted as part of the arg list building op sequence. I'm poking to find an elegant way to fix that. --Wez. On Mar 18, 2007,

Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-18 Thread Jan Lehnardt
On Mon 19 Mar 2007, at 19 Mar 00:41, Wez Furlong wrote: So, the question is, do we want this in PHP? yes, please. Jan -- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] PATCH: anonymous functions in PHP

2007-03-18 Thread Wez Furlong
We've been daydreaming about the ability to do something like this in PHP: $data = array("zoo", "orange", "car", "lemon", "apple"); usort($data, function($a, $b) { return strcmp($a, $b); }); var_dump($data); # data is sorted alphabetically In the past, people have been told to use the travesty

[PHP-DEV] CVS Account Request: cardoe

2007-03-18 Thread Doug Goldstein
Hi, I'm going to be taking over maintaining ext/ldap as per my discussions with Antony Dovgal and Ilia Alshanetsky. So I need to get setup with a CVS account to be able to commit. Thanks. -- Doug Goldstein <[EMAIL PROTECTED]> http://dev.gentoo.org/~cardoe/ signature.asc Description: OpenPGP

Re: [PHP-DEV] google SoC - dbobj

2007-03-18 Thread Lukas Kahwe Smith
Hi, just to clarify .. from your comments I am quite hopeful in your proposal. regards, Lukas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] google SoC - dbobj

2007-03-18 Thread Bankó Ádám
> I remember that Thies once said, the ultimate goal of the PHP language > would be to make everything fast enough in PHP so that everything can be > done in user space. All the extension should do is expose third party > libs. Of course this might only be a dream, but I think its one of those

Re: [PHP-DEV] google SoC - dbobj

2007-03-18 Thread Lukas Kahwe Smith
Bankó Ádám wrote: Pure C code has access to PHP5's low level object API, so it can produce a really intuitive interface (object persistence), that you can't do from PHP code. C code uses a bit less memory and a lot less CPU time I would hope that the solution for "low level object API" would b

Re: [PHP-DEV] google SoC - dbobj

2007-03-18 Thread Bankó Ádám
Hi! First a small abstract: Lukas suggested that a full ORM shouldn't be implemented in C. The short reply is that I think that core ORM features could be implemented in C, and that would be good. Why? Read the rest.. I've looked into the phpdbabstraction list you liked and I think it's a brilli

[PHP-DEV] CVS Account Request: mojtabajml

2007-03-18 Thread mojtaba jamali
for newsletter -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Mail function undefined in PHP6

2007-03-18 Thread Tijnema !
On 3/18/07, Mike Robinson <[EMAIL PROTECTED]> wrote: Tijnema ! > Well, i installed sendmail 8.14.0, and it did install the > sendmail binary into /usr/sbin/sendmail, and configure could > find it, so i recompiled/reinstalled PHP and now it still > can't find the mail command... > So what can be