Skip to content

Instantly share code, notes, and snippets.

@slevy1ster
Forked from jpauli/PHP gotcha 2013
Created January 8, 2014 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slevy1ster/8324571 to your computer and use it in GitHub Desktop.
Save slevy1ster/8324571 to your computer and use it in GitHub Desktop.
$o1 = new stdclass($a=8);
var_dump($a); // Notice: Undefined variable: a
$o2 = new Datetime($b='now');
var_dump($b); // string "now"
@slevy1ster
Copy link
Author

An enticing mystery but it's great once you get it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment