3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_POST['one'] = '1 rabbit'; $_POST['two'] = '2 rabbit'; $_POST['three'] = '3 rabbit'; foreach ($_POST as $var => $value) { if (isset($$var)) { continue; } $$var = $value; } var_dump($one); var_dump($two); var_dump($three);
based on dZpoH
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.6
string(8) "1 rabbit" string(8) "2 rabbit" string(8) "3 rabbit"