3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $db[$i]["var"] = 'apple'; $_GET['var'] = 'apple'; print "Comparing " . $_GET['var'] . " with " . $db[$i]["var"] . ": "; if($_GET['var'] == $db[$i]["var"]){ print "Y"; }else{ print "N"; } if($_GET['var'] === $db[$i]['var']){ print "Y"; }else{ print "N"; } if(strpos($_GET['var'], $db[$i]['var']) === false){ print "N"; }else{ print "Y"; } if(strpos($_GET['var'], $db[$i]['var']) !== false){ print "Y"; }else{ print "N"; }
Output for 7.1.0 - 7.2.0
Notice: Undefined variable: i in /in/ZejSt on line 3 Notice: Undefined variable: i in /in/ZejSt on line 3 Notice: Undefined variable: i in /in/ZejSt on line 6 Comparing apple with apple: Notice: Undefined variable: i in /in/ZejSt on line 7 Y Notice: Undefined variable: i in /in/ZejSt on line 12 Y Notice: Undefined variable: i in /in/ZejSt on line 17 Y Notice: Undefined variable: i in /in/ZejSt on line 22 Y
Output for 5.0.4 - 7.0.20
Notice: Undefined variable: i in /in/ZejSt on line 3 Notice: Undefined variable: i in /in/ZejSt on line 6 Comparing apple with apple: Notice: Undefined variable: i in /in/ZejSt on line 7 Y Notice: Undefined variable: i in /in/ZejSt on line 12 Y Notice: Undefined variable: i in /in/ZejSt on line 17 Y Notice: Undefined variable: i in /in/ZejSt on line 22 Y
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/ZejSt on line 3 Notice: Undefined variable: i in /in/ZejSt on line 6 Comparing apple with apple: Notice: Undefined variable: i in /in/ZejSt on line 7 Y Notice: Undefined variable: i in /in/ZejSt on line 12 Y Notice: Undefined variable: i in /in/ZejSt on line 17 Y Notice: Undefined variable: i in /in/ZejSt on line 22 Y