Games PHP Copy or Share

Copy or Share

Arrays copy, objects share, clone is shallow, & ties two names together.

0 / 8 levels · 0 / 24 ★Start playing ›
  1. Copy or Share

    A variable is a name tag. An array is a box: assign it and you get your own box (PHP only copies when one side writes). An object is a shared room: copying the variable copies the key, not the room. A reference (&) is two name tags on the same box.

Your rulebook

Finish a level to add its rule. Fill the book and you can explain all of this in an interview.

  1. 1Finish Your own box to unlock this rule.
  2. 2Finish Functions get a copy to unlock this rule.
  3. 3Finish One room, many keys to unlock this rule.
  4. 4Finish clone is shallow to unlock this rule.
  5. 5Finish __clone makes it deep to unlock this rule.
  6. 6Finish & is two tags on one box to unlock this rule.
  7. 7Finish The foreach & trap to unlock this rule.
  8. 8Finish A shared room, a copied box to unlock this rule.