3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
$latitude = 'foo'; $longitude = 'bar'; <script> var latitude = <?php echo "'" . $latitude . "'" ?>; var longitude = <?php echo "'" . $longitude . "'" ?>; </script>
based on O8h2l
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
$latitude = 'foo'; $longitude = 'bar'; <script> var latitude = Notice: Undefined variable: latitude in /in/L7rvv on line 5 ''; var longitude = Notice: Undefined variable: longitude in /in/L7rvv on line 6 ''; </script>
Output for 4.3.0 - 5.0.3
$latitude = 'foo'; $longitude = 'bar'; <script> var latitude = Notice: Undefined variable: latitude in /in/L7rvv on line 5 ''; var longitude = Notice: Undefined variable: longitude in /in/L7rvv on line 6 ''; </script>