3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for ($i = 0; $i < 2; $i++) { $sql = "INSERT INTO `tblchitiethoadon`(`Ma_HD`, `Ma_SP`, `Ten_SP`, `SoLuong`, `Gia`)"; $sql.=" VALUES ($mahd,$proid,'$prodName',$taken,$price)"; echo $sql; }
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: mahd in /in/DNP4k on line 9 Notice: Undefined variable: proid in /in/DNP4k on line 9 Notice: Undefined variable: prodName in /in/DNP4k on line 9 Notice: Undefined variable: taken in /in/DNP4k on line 9 Notice: Undefined variable: price in /in/DNP4k on line 9 INSERT INTO `tblchitiethoadon`(`Ma_HD`, `Ma_SP`, `Ten_SP`, `SoLuong`, `Gia`) VALUES (,,'',,) Notice: Undefined variable: mahd in /in/DNP4k on line 9 Notice: Undefined variable: proid in /in/DNP4k on line 9 Notice: Undefined variable: prodName in /in/DNP4k on line 9 Notice: Undefined variable: taken in /in/DNP4k on line 9 Notice: Undefined variable: price in /in/DNP4k on line 9 INSERT INTO `tblchitiethoadon`(`Ma_HD`, `Ma_SP`, `Ten_SP`, `SoLuong`, `Gia`) VALUES (,,'',,)
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: mahd in /in/DNP4k on line 9 Notice: Undefined variable: proid in /in/DNP4k on line 9 Notice: Undefined variable: prodName in /in/DNP4k on line 9 Notice: Undefined variable: taken in /in/DNP4k on line 9 Notice: Undefined variable: price in /in/DNP4k on line 9 INSERT INTO `tblchitiethoadon`(`Ma_HD`, `Ma_SP`, `Ten_SP`, `SoLuong`, `Gia`) VALUES (,,'',,) Notice: Undefined variable: mahd in /in/DNP4k on line 9 Notice: Undefined variable: proid in /in/DNP4k on line 9 Notice: Undefined variable: prodName in /in/DNP4k on line 9 Notice: Undefined variable: taken in /in/DNP4k on line 9 Notice: Undefined variable: price in /in/DNP4k on line 9 INSERT INTO `tblchitiethoadon`(`Ma_HD`, `Ma_SP`, `Ten_SP`, `SoLuong`, `Gia`) VALUES (,,'',,)