Re: [RFC] Closure::call and Function Referencing as Closures

From: Date: Mon, 04 Aug 2014 06:45:01 +0000
Subject: Re: [RFC] Closure::call and Function Referencing as Closures
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-76330@lists.php.net to get a copy of this message
Hi! > https://wiki.php.net/rfc/function_referencing This syntax collides with by-ref assignment and by-ref arrays, which is not good. Different things should not look the same. I'm not sure also how exactly non-closures can function as closures - if you take SplFixedArray::getSize and rebind it to SplFileObject, what is supposed to happen? I also do not understand why one needs &strlen if "strlen" works just fine. Only to declare "PHP now has first-class functions"? You can declare it right now. No need to change the syntax for that, since the engine does exactly the same and no additional capabilities appear (though additional problems - e.g. rebinding non-closures - do). -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/

« previous php.internals (#76330) next »