Typehints and = null
I just committed a patch to PHP CVS which allows you to do the following:
<?php
class foo {
}
function bla( foo $blah = null )
{
var_dump( $blah );
}
$f = new foo;
bla( $f );
bla();
bla( null );
?>
Comments
THANK YOU! Will it be in 5.1 ?
Yes, it will be in PHP 5.1.0.
I was hoping this would be added.
Thank you for making my life a little bit easier. Now I can be even LAZIER with doc comments :D
I'm going to assume that this will be in 6.0 as 5.1 has Release Candidates out.
That is what he just said. :)
No, I said that this will be in PHP 5.1.0 too.
Life Line
Opening hours
Added Mr Francatelli
Created 2 entrances
Updated a clothes shop; Confirmed an alcohol shop
I hiked 7.6km in 4h8m54s
Updated a pub
I walked 8.5km in 1h31m26s
Merge branch 'xdebug_3_5'
Merged pull request #1082
Created an insect_hotel
Created an information
Created 15 benches and 6 waste_baskets; Deleted a life_ring and a waste_basket
I walked 6.4km in 1h27m38s
I walked 1.2km in 10m44s
Added a test case, and some cleanup
Fixed issue #2423: Don't follow symlinks with file creation
Merge branch 'xdebug_3_5'
Merged pull request #1081
Added missing output in xdebug_info() wrt debug options
Fixed issue #2422: No limit on DBGP read buffer
Merge branch 'xdebug_3_5'
Merged pull request #1080
Add test case for issue #2421: Crash with wrong option letter in DBGP…
Fixed issue #2421: Crash with wrong option letter in DBGP and socket …


Shortlink
This article has a short URL available: https://drck.me/ta-n-47q