+1
Thanks for very detailed proposal.
I think "Traits for PHP" is good idea.
But I think, that "use" keword make some confusing, I propose "have" or
"hold" instead.
And "!" not readable (imho) - I'd like "not" or "except"
And aliasing syntax (bar=>foo) looks good in my mind.
--
PHP Internals -
a) Commit square bracket array shortcut patch
keys and values are separated by colons.
( http://www.opendogs.org/pub/php-5.3dev-080109-sbar.patch )
e.g.
$a = [1, 2, 3];
$b = ['foo': 'orange', 'bar': 'apple', 'baz': 'lemon'];
Breaks from PHP's => for no apparent reason (one charact
Johannes Schlüter writes:
The last line is exactly why I won't like such a syntax. Just consider
the a bit worse call like
foo([1, $a[2]]);
I might even construct worse examples,
is this a good-readable code?
foo (array('a'=2,'b'=>array('x'=>5,'c'=>array(1,4,2)),'n'=>$bar[4]));
what diffe
I use PHP since version 5.0 release
I'd like use this syntax
$a = [ 2,6,9 ];
$b = ['a'=>1 , 'v'=>'string'];
foo(['bar'=>2, 'test'=null]);
Andi Gutmans пишет:
Andi 2003:
http://www.mail-archive.com/internals@lists.php.net/msg03896.html
Andi's brain evolves 2007:
http://marc.info/?l=php-inter