3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $query_string = 'foo=' . urlencode($foo) . '&bar=' . urlencode($bar); echo '<a href="mycgi?' . htmlentities($query_string) . '">'; ?>
Output for 5.0.4 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
Notice: Undefined variable: foo in /in/OagXo on line 2 Notice: Undefined variable: bar in /in/OagXo on line 2 <a href="mycgi?foo=&amp;bar=">
Output for hhvm-3.12.0
Notice: Undefined variable: foo in /in/OagXo on line 2 Warning: urlencode() expects parameter 1 to be string, null given in /in/OagXo on line 2 Notice: Undefined variable: bar in /in/OagXo on line 2 Warning: urlencode() expects parameter 1 to be string, null given in /in/OagXo on line 2 <a href="mycgi?foo=&amp;bar=">
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: foo in /in/OagXo on line 2 Notice: Undefined variable: bar in /in/OagXo on line 2 <a href="mycgi?foo=&amp;bar=">