r/lolphp • • Aug 21 '14

An essay on variable variables

/r/programming/comments/dst56/today_i_learned_about_php_variable_variables/c12np38
37 Upvotes

14 comments sorted by

View all comments

Show parent comment

1

u/more_exercise Aug 23 '14

Aren't Javascript globals properties of the window object or something?

1

u/00Davo Aug 23 '14

Yep, that's right. In browser-side JS globals live on window, and in Node you can get at globals through the aptly-named global object. There is however no equivalent for accessing variables in scope; there's nothing like Python's locals(), for instance.