3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "hello"; $b = "hi"; $val = "a"; echo $$val; // outputs "hello" echo "\n"; function wer(){ $val = "b"; echo $$val; // outputs "hi" } wer();
based on 7BJVA
Output for 5.0.4 - 7.1.0
hello Notice: Undefined variable: b in /in/Dl6eA on line 11
Output for 4.3.0 - 5.0.3
hello Notice: Undefined variable: b in /in/Dl6eA on line 11