May
30

New array type hinting have been added in PHP CVS reported Nucluez blog:

Support for array type hint was added to PHP ( in cvs ) a couple of days ago:
nucleuz$ ./php -r ‘function foo( array $a ) { print_r( $a ); } foo( array( 1,2,3 ) ); foo( “Hello” );’

Array( [0] => 1 [1] => 2 [2] => 3 )

Fatal error: Argument 1 must be an array in Command line code on line 1

Tags: No Tags

No Responses

Leave a Response

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>