3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $boo = 1; $_SESSION['boo']='$boo'; $boo = 2; echo 'boo = ', $boo, ' '; echo '$_SESSION[boo] = ', ${$_SESSION[boo]};
based on ogqKr
Output for 7.2.0
boo = 2 $_SESSION[boo] = Warning: Use of undefined constant boo - assumed 'boo' (this will throw an Error in a future version of PHP) in /in/MpvR2 on line 6 Notice: Undefined variable: $boo in /in/MpvR2 on line 6
Output for 5.3.18 - 7.1.10
boo = 2 $_SESSION[boo] = Notice: Use of undefined constant boo - assumed 'boo' in /in/MpvR2 on line 6 Notice: Undefined variable: $boo in /in/MpvR2 on line 6