Skip to content

Instantly share code, notes, and snippets.

@jordanorelli
Created August 29, 2014 16:12
Show Gist options
  • Save jordanorelli/345701ebd9697d80582c to your computer and use it in GitHub Desktop.
Save jordanorelli/345701ebd9697d80582c to your computer and use it in GitHub Desktop.
<?php
$item = json_decode('{"key": "value"}');
print_r($item);
$other_item = json_decode('{"key": "value"');
print_r($other_item);
echo is_null($other_item);
$things = ["one": 1, "two": 2];
print_r($things);
$old_three = $things["three"];
$things["three"] = "fart";
print_r($things);
$things["three"] = $old_three;
print_r($things);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment