3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php include("../class/db.class.php"); $adsoyad=strip_tags(trim($_POST['adsoyad'])); $zdmail=strip_tags(trim($_POST['email'])); $zdmesaj=strip_tags(trim($_POST['mesaj'])); $mesajtarih=date("d.m.Y H:i:s"); $mesajip=$_SERVER['REMOTE_ADDR']; $ipsql="SELECT ip FROM zdefter where ip='$mesajip'"; $ipkontrol=$db->baglanti->query($ipsql)->rowCount(); if($ipkontrol>0){echo"ipvar";}else{ if($adsoyad=="" or $zdmail=="" or $zdmesaj==""){echo"formbos";}else{ $sql="insert into zdefter(adsoyad,email,mesaj,ip,tarih)values('$adsoyad','$zdmail','$zdmesaj','$mesajip','$mesajtarih')"; $db->baglanti->exec($sql); echo"eklendi"; } } ?>
based on kuLmD
Output for 7.0.0 - 7.1.0
Warning: include(../class/db.class.php): failed to open stream: No such file or directory in /in/jhXQb on line 3 Warning: include(): Failed opening '../class/db.class.php' for inclusion (include_path='.:') in /in/jhXQb on line 3 Notice: Undefined index: adsoyad in /in/jhXQb on line 5 Notice: Undefined index: email in /in/jhXQb on line 6 Notice: Undefined index: mesaj in /in/jhXQb on line 7 Notice: Undefined index: REMOTE_ADDR in /in/jhXQb on line 9 Notice: Undefined variable: db in /in/jhXQb on line 11 Notice: Trying to get property of non-object in /in/jhXQb on line 11 Fatal error: Uncaught Error: Call to a member function query() on null in /in/jhXQb:11 Stack trace: #0 {main} thrown in /in/jhXQb on line 11
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Warning: File not found: ../class/db.class.php in /in/jhXQb on line 3 Notice: Undefined index: adsoyad in /in/jhXQb on line 5 Notice: Undefined index: email in /in/jhXQb on line 6 Notice: Undefined index: mesaj in /in/jhXQb on line 7 Notice: Undefined index: REMOTE_ADDR in /in/jhXQb on line 9 Notice: Undefined variable: db in /in/jhXQb on line 11 Notice: Cannot access property on non-object in /in/jhXQb on line 11 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function query() on a non-object (null)' in /in/jhXQb:11 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.23
Warning: include(../class/db.class.php): failed to open stream: No such file or directory in /in/jhXQb on line 3 Warning: include(): Failed opening '../class/db.class.php' for inclusion (include_path='.:') in /in/jhXQb on line 3 Notice: Undefined index: adsoyad in /in/jhXQb on line 5 Notice: Undefined index: email in /in/jhXQb on line 6 Notice: Undefined index: mesaj in /in/jhXQb on line 7 Notice: Undefined index: REMOTE_ADDR in /in/jhXQb on line 9 Notice: Undefined variable: db in /in/jhXQb on line 11 Notice: Trying to get property of non-object in /in/jhXQb on line 11 Fatal error: Call to a member function query() on null in /in/jhXQb on line 11
Process exited with code 255.
Output for 5.3.0 - 5.5.37
Warning: include(../class/db.class.php): failed to open stream: No such file or directory in /in/jhXQb on line 3 Warning: include(): Failed opening '../class/db.class.php' for inclusion (include_path='.:') in /in/jhXQb on line 3 Notice: Undefined index: adsoyad in /in/jhXQb on line 5 Notice: Undefined index: email in /in/jhXQb on line 6 Notice: Undefined index: mesaj in /in/jhXQb on line 7 Notice: Undefined index: REMOTE_ADDR in /in/jhXQb on line 9 Notice: Undefined variable: db in /in/jhXQb on line 11 Notice: Trying to get property of non-object in /in/jhXQb on line 11 Fatal error: Call to a member function query() on a non-object in /in/jhXQb on line 11
Process exited with code 255.
Output for 5.1.0 - 5.2.17
Warning: include(../class/db.class.php): failed to open stream: No such file or directory in /in/jhXQb on line 3 Warning: include(): Failed opening '../class/db.class.php' for inclusion (include_path='.:') in /in/jhXQb on line 3 Notice: Undefined index: adsoyad in /in/jhXQb on line 5 Notice: Undefined index: email in /in/jhXQb on line 6 Notice: Undefined index: mesaj in /in/jhXQb on line 7 Notice: Undefined index: REMOTE_ADDR in /in/jhXQb on line 9 Notice: Undefined variable: db in /in/jhXQb on line 11 Notice: Trying to get property of non-object in /in/jhXQb on line 11 Fatal error: Call to a member function query() on a non-object in /in/jhXQb on line 11
Process exited with code 255.
Output for 5.0.4 - 5.0.5
Warning: main(../class/db.class.php): failed to open stream: No such file or directory in /in/jhXQb on line 3 Warning: main(): Failed opening '../class/db.class.php' for inclusion (include_path='.:') in /in/jhXQb on line 3 Notice: Undefined index: adsoyad in /in/jhXQb on line 5 Notice: Undefined index: email in /in/jhXQb on line 6 Notice: Undefined index: mesaj in /in/jhXQb on line 7 Notice: Undefined index: REMOTE_ADDR in /in/jhXQb on line 9 Notice: Undefined variable: db in /in/jhXQb on line 11 Notice: Trying to get property of non-object in /in/jhXQb on line 11 Fatal error: Call to a member function query() on a non-object in /in/jhXQb on line 11
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Warning: main(../class/db.class.php): failed to open stream: No such file or directory in /in/jhXQb on line 3 Warning: main(): Failed opening '../class/db.class.php' for inclusion (include_path='.:') in /in/jhXQb on line 3 Notice: Undefined index: adsoyad in /in/jhXQb on line 5 Notice: Undefined index: email in /in/jhXQb on line 6 Notice: Undefined index: mesaj in /in/jhXQb on line 7 Notice: Undefined index: REMOTE_ADDR in /in/jhXQb on line 9 Notice: Undefined variable: db in /in/jhXQb on line 11 Notice: Trying to get property of non-object in /in/jhXQb on line 11 Fatal error: Call to a member function query() on a non-object in /in/jhXQb on line 11
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/jhXQb on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/jhXQb on line 11
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/jhXQb on line 11
Process exited with code 255.