3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $v1=0;$v2=0;$v3=0;$v4=0; $a=(array)json_decode('{"a1":"1337hurensohn_","a2":[["ctf"],"011111111111111111111111111111111111111ctf","ctf","ctf","ctf"]}'); if(is_array($a)){ is_numeric($a["a1"])?die("nope"):NULL; if($a["a1"]){ ($a["a1"]>1336)?$v1=1:NULL; } if(is_array($a["a2"])){ if(count($a["a2"])!==5 OR !is_array($a["a2"][0])) die("nope"); $pos = array_search("ctf", $a["a2"]); $pos===false?die("nope"):NULL; foreach($a["a2"] as $key=>$val){ $val==="ctf"?die("nope"):NULL; } $v2=1; } } $b = '1.23.4'; if(preg_match("/^([0-9]+\.?[0-9]+)+$/",$b)){ $b=json_decode($b); if($var = $b === NULL){ ($var===true)?$v3=1:NULL; } } $c=''; $d=''; if($c[1]){ if(!strcmp($c[1],$d) && $c[1]!==$d){ eregi("3|1|c",$d.$c[0])?die("nope"):NULL; strpos(($c[0].$d), "31c3")?$v4=1:NULL; } } if($v1 && $v2 && $v3 && $v4){ include "flag.php"; echo $flag; } ?>
based on QFBTi
Output for 5.2.0 - 7.2.0
nope
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/VA0jD on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/VA0jD on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/VA0jD on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/VA0jD on line 3