3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? php $latitude = 'foo'; $longitude = 'bar'; ?> <script> var latitude = <?php echo "'" . $latitude . "'" ?>; var longitude = <?php echo "'" . $longitude . "'" ?>; </script>
based on L7rvv
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.34
Parse error: syntax error, unexpected '$latitude' (T_VARIABLE) in /in/faUfB on line 2
Process exited with code 255.
Output for 5.0.4 - 5.4.32
<? php $latitude = 'foo'; $longitude = 'bar'; ?> <script> var latitude = Notice: Undefined variable: latitude in /in/faUfB on line 7 ''; var longitude = Notice: Undefined variable: longitude in /in/faUfB on line 8 ''; </script>
Output for 4.3.0 - 5.0.3
<? php $latitude = 'foo'; $longitude = 'bar'; ?> <script> var latitude = Notice: Undefined variable: latitude in /in/faUfB on line 7 ''; var longitude = Notice: Undefined variable: longitude in /in/faUfB on line 8 ''; </script>