Skip to content

Instantly share code, notes, and snippets.

@OrangeTux
Created September 30, 2013 15:15
Show Gist options
  • Save OrangeTux/6765288 to your computer and use it in GitHub Desktop.
Save OrangeTux/6765288 to your computer and use it in GitHub Desktop.
<?php
$global = array();
$reference = &$global;
$copy = $global;
$global[] = "global";
$reference[] = "reference";
$copy[] = "copy";
print_r($global);
print_r($reference);
print_r($copy);
print $global === $reference;
print $global === $copy;
print $reference === $copy;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment