Reply to comment

PHP list and array....

One day, I wish I can write this in PHP

while( $filename = $files->next() )
{
   [ $a, $b, $c, $d ] = getimageinfo($filename);
   $sizes[] = [ $filename, $a, $b ];
}

It would be nice if [ ] was an array constructor. It would also be nice if [ ... ] on the left side of = would behave like list(...).

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul> <p> <br> <div> <pre> <code> <img><h1><h2><h3><h4> <blockquote>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

.