3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_GET['aaa'] = "0.9999999999999999"; $a=0; $b=0; $c=0; if (isset($_GET['aaa'])) { $aaa = $_GET['aaa']; $aaa=="1"?die("1"):NULL; switch ($aaa) { case 0: case 1: $a=1; break; } } var_dump($a); $bbb=(array)json_decode(@$_GET['bbb']); if(is_array($bbb)){ is_numeric(@$bbb["ccc"])?die("2"):NULL; if(@$bbb["ccc"]){ ($bbb["ccc"]>2017)?$b=1:NULL; } if(is_array(@$bbb["ddd"])){ if(count($bbb["ddd"])!==2 OR !is_array($bbb["ddd"][0])) die("3"); $eee = array_search("XMAN", $bbb["ddd"]); $eee===false?die("4"):NULL; foreach($bbb["ddd"] as $key=>$val){ $val==="XMAN"?die("5"):NULL; } $c=1; } } else { echo 'r'; } if($a && $b && $c){ echo 'Yes'; } ?>
based on BY2B0
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc2
int(0)
Output for hhvm-3.15.4
int(0) Warning: json_decode() expects parameter 1 to be string, null given in /in/9X1RO on line 21