Skip to content

Instantly share code, notes, and snippets.

@garoevans
Created April 3, 2014 12:02
Show Gist options
  • Save garoevans/9953119 to your computer and use it in GitHub Desktop.
Save garoevans/9953119 to your computer and use it in GitHub Desktop.
Curly braces for array acces?
<?php
$x = 10;
$foo = null;
$ref = &$foo;
do {
$ref = array('foo' => 'bar');
$ref = &$ref['foo'];
} while (--$x);
echo $foo{'foo'}['foo']{'foo'}['foo']{'foo'}['foo']{'foo'}['foo']{'foo'}['foo'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment