Skip to content

Instantly share code, notes, and snippets.

@slevy1ster
Forked from jpauli/PHP gotcha 2013
Created January 8, 2014 21:00
Embed
What would you like to do?
$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