On 7 September 2015 at 11:37, Ben Scholzen wrote:
> Hello,
>
> Hi Ben!
>>
>> Generics are a feature I'd love to see in PHP. I think this RFC could do
>> with a little elaboration, though.
>>
>> Something that's particularly important to me is if it be possible to
>> have default values for type p
On 14 December 2014 at 08:24, Leon Sorokin wrote:
>
> On 12/14/2014 12:51 AM, Levi Morrison wrote:
>
> > While I think long-term this would be a beneficial change I think in
> > the short term it's quite a hurdle.
>
> This discussion will be identical whether we wait till PHP7 or PHP9 in a
> decad
On 11 September 2013 16:09, Leszek KrupiĆski wrote:
> On the other hand, I could downvote a person that has a different opinion
> than I do.
>
And the negative reaction on a forum to someone doing that would be much
more visible, and much more effective at getting them to not do something
so des
What about:
class Giant {
public function foo( $height, $width ) { ... }
}
class FallenOverGiant extends Giant {
public function foo( $width, $height ) { ... }
}
There's nothing to stop you doing that; I think it's actually done in some
of the codebases I work on.
Regarding variable parameter names; if the syntax was:
function foo( $firstParameter ) { ... }
foo( $firstParameter=> 'foo' );
Then the double-dollar syntax would seem the obvious choice to me:
function foo( $firstParameter ) { ... }
$param = 'firstParameter';
foo( $$param => 'whatever' );
Whic