3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $precio_1 = 100.00; $precio_2 = 150.00; $precio_3 = 231.50; $precio_4 = 458.44; $precio_5 = 123.15; <?php for($i=1;$i<=5;$i++) { //Here I want to do the macrosustitution. $p = 'precio_'.$i; $precio = $$p; ?> <label>Precio <?php echo $i;?></label> <input type="text" name="<?php echo $precio; ?>" value="<?php echo $precio; ?>"/> <?php } ?>
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.27
Parse error: syntax error, unexpected '<' in /in/Ws44c on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '<' in /in/Ws44c on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Ws44c on line 9
Process exited with code 255.