Hi,
On 3/21/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
I think solving the common need for 99% of the people with a nice
simple clean anonymous function is PHP way.
Right. But then those people add 2 + 2 and get frustrated because they
can't do the obvious ;)
If somebody has a real-life de
Michael Walter wrote:
> Right. But then those people add 2 + 2 and get frustrated because they
> can't do the obvious ;)
I find it all but obvious to being able to use non-local, non-global
variables in PHP. It's one of the main PHP points IMHO that a variables
is either local or explicitely acces
Hi,
On 3/22/07, Christian Schneider <[EMAIL PROTECTED]> wrote:
Michael Walter wrote:
> Right. But then those people add 2 + 2 and get frustrated because they
> can't do the obvious ;)
I find it all but obvious to being able to use non-local, non-global
variables in PHP. It's one of the main PHP
Michael Walter wrote:
>> I find it all but obvious to being able to use non-local, non-global
>> variables in PHP. It's one of the main PHP points IMHO that a variables
>> is either local or explicitely accessed through $_GLOBALS (or super
>> globals). It gives me a warm and fuzzy feeling that I kn
On 22/03/07, Christian Schneider <[EMAIL PROTECTED]> wrote:
>> If somebody has a real-life demonstrated NEED for the
>> closures/scoping, by all means, bring it up.
>
> Plain old google brought up:
> http://groovy.codehaus.org/Martin+Fowler's+closure+examples+in+Groovy
> among other hits (Groovy
> function sort_by_key($key) {
For the record, I do like this syntax, but it COULD be rewritten using
current practices (see below).
class SortByKey {
public $key;
public function __construct($key) {
$this->key = $key;
}
public function do($a, $b) {
if ($a[$this->key] < $b[$this->k
On 3/22/07, Christian Schneider <[EMAIL PROTECTED]> wrote:
Michael Walter wrote:
> Which seems to fit Andi's $_SCOPE proposal.
Yes, but is a point against a real closure proposal.
I think the defining property of a "real" closure proposal is having
the lexical scope available.
So I guess we bo
On 3/22/07, Sean Coates <[EMAIL PROTECTED]> wrote:
That said, I like the idea of a first class callable object.
For the example above, doing this:
class SortByKey implements Callable {}
Note that this is what Java did since day one (it was thought that
anonymous inner classes were good enough)
Michael Walter wrote:
> A simple real-life example is:
> function pick($member)
> {
> return create_function('$x', 'return $x->'.$member.';');
> }
>
> which could be used e.g. in
> array_map(pick('age'), $people).
> Arguably, in this case you could as well write:
> array_map(function($p) {retur
On 22/03/07, Sean Coates <[EMAIL PROTECTED]> wrote:
> function sort_by_key($key) {
For the record, I do like this syntax, but it COULD be rewritten using
current practices (see below).
I know, and it can be done without typing so much:
class SortByKey {
function __call($name, $a) {
As subject.
--
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
Index: proc_open.c
===
RCS file: /repository/php-src/ext/standar
For the record, I do like this syntax, but it COULD be rewritten using
current practices (see below).
That's a good point - actually most uses of closures could be with some
effort rewritten as classes. The difference would be that in case of
closures, closure chooses which parts of context to
I would like to help develop pear/PEAR_Frontend_Web, cellog asked me to apply
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
(mat) Tias Guns wrote:
> I would like to help develop pear/PEAR_Frontend_Web, cellog asked me to apply
confirmed,
Greg
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On Thu, 22 Mar 2007 12:02:50 +0500
"Back Ports" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is there any progress on the following bug report:
>
> http://bugs.php.net/bug.php?id=33500&thanks=6
>
> It was reported quite a while ago -- I also saw a relevant post on the
> mit kerberos mailing list wh
I'm seeing that PHP_MINIT_FUNCTION does not get called if it's loaded
with dl from a CLI script. Anyone else seeing that?
If I add two lines to write a file like:
PHP_MINIT_FUNCTION(plexcel)
{
FILE *out = fopen("/tmp/plexcel.log", "a");
fprintf(out, "module initializing ...\n"); fflush(out);
The
On Thu, 22 Mar 2007 20:02:53 -0400
Michael B Allen <[EMAIL PROTECTED]> wrote:
> I'm seeing that PHP_MINIT_FUNCTION does not get called if it's loaded
> with dl from a CLI script. Anyone else seeing that?
>
> If I add two lines to write a file like:
>
> PHP_MINIT_FUNCTION(plexcel)
> {
> FILE *out
Hi there,
looking around quickly I couldn't find any documentation on the
following change:
$a = "foo"; echo "\{$a}";
PHP 4.4.4: {foo}
PHP 5.2.1: \{foo}
I didn't check which exact version introduced this change. Some
third-party code used this obscure construct and failed when migrating
from
On Thu, March 22, 2007 8:09 am, Christian Schneider wrote:
>> Plain old google brought up:
>> http://groovy.codehaus.org/Martin+Fowler's+closure+examples+in+Groovy
>> among other hits (Groovy syntax should be easy enough to follow).
>
> He said real-life examples (-:C
I said real-life NEED, as in
On Wed, March 21, 2007 2:47 am, Tijnema ! wrote:
> On 3/21/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>>
>> I splice the ID3 tags onto the front of an MP3 stream in PHP on this
>> site:
>>
>> http://uncommonground.com/
>>
>> The id3 library in PHP is quite good at this, but needs a
>> maintainer.
On Wed, March 21, 2007 3:57 am, Antony Dovgal wrote:
> I don't think anybody sane is doing audio encoding and video resizing
> in PHP.
> PHP is about interface, clients are not going to wait an hour or two
> for a page to load.
E.
Actually, I have many PHP scripts with fire up exec processes
On Wed, March 21, 2007 3:57 am, Antony Dovgal wrote:
> I don't think anybody sane is doing audio encoding and video resizing
Whoops!
Sorry.
I missed the part about being sane.
That makes my previous post invalid.
:-)
--
Some people have a "gift" link here.
Know what I want?
I want you to buy
> Hi there,
> looking around quickly I couldn't find any documentation on the
> following change:
> $a = "foo"; echo "\{$a}";
>
> PHP 4.4.4: {foo}
> PHP 5.2.1: \{foo}
>
> I didn't check which exact version introduced this change. Some
> third-party code used this obscure construct and failed when m
--- Richard Lynch <[EMAIL PROTECTED]> wrote:
> On Thu, March 22, 2007 8:09 am, Christian Schneider wrote:
> >> Plain old google brought up:
> >> http://groovy.codehaus.org/Martin+Fowler's+closure+examples+in+Groovy
> >> among other hits (Groovy syntax should be easy enough to follow).
> >
> > He s
24 matches
Mail list logo