Skip to content

Instantly share code, notes, and snippets.

@armetiz
Created March 21, 2012 14:55
Show Gist options
  • Save armetiz/2147907 to your computer and use it in GitHub Desktop.
Save armetiz/2147907 to your computer and use it in GitHub Desktop.
$test = array();
$test["foo"] = "bar";
$tests = array();
$tests[] = $test;
echo "<pre>";
var_dump($test === $tests[0]); //true
var_dump($tests);
echo "</pre>";
------
$test = array();
$tests = array();
$tests[] = $test;
$test["foo"] = "bar";
echo "<pre>";
var_dump($test === $tests[0]); //false
var_dump($tests);
echo "</pre>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment