3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $game_cat = "Category 1"; if ( $game_cat === "Category 1" ) { $cid = 1; } if ( $game_cat === "Category 2" ) { $cid = 2; } if ( $game_cat === "Category 3" ) { $cid = 0; } else{ $cid = 999999; } var_dump($game_cat, $cid);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(10) "Category 1" int(999999)