3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cal = $_REQUEST["cal"]; $lad = $_REQUEST["lad"]; switch($cal) { case "area": $area = $lad * $lad; echo "El del rectángulo e ingresado es: $area"; break; case "peri": $peri = $lad * 4; echo "Su perímetro es de: $peri"; break; default: echo "Debe seleccionar una opción"; break; } ?>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: cal in /in/4ZIPU on line 2 Notice: Undefined index: lad in /in/4ZIPU on line 3 Debe seleccionar una opción
Output for 4.3.0 - 5.2.17
Notice: Undefined index: cal in /in/4ZIPU on line 2 Notice: Undefined index: lad in /in/4ZIPU on line 3 Debe seleccionar una opción