Re: Syntactic improvement to array

From: Date: Sun, 04 Feb 2007 14:58:19 +0000
Subject: Re: Syntactic improvement to array
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-27741@lists.php.net to get a copy of this message
Hannes Magnusson wrote:
typeHinted([1 => [1 => []]]); // array(1 => array(1 => array()));
IMHO the common case would benefit and your pathological example is unreadable both ways. Personally I'd reformat it to typeHinted([ 1 => [ 1 => [] ] ]); resp. typeHinted(array( 1 => array( 1 => array(), ) )); or something similar anyway to make them readable. Plus you could still use array() if you really wanted to. Regards, - Chris

« previous php.internals (#27741) next »