3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $overAge = array('LO70','OFP'); $freeGift = array('LFG'); $endowment = array('PSE','EIQ','PED','ELI'); $cashback = array('LWC'); $mortgageCover = array('MIQ'); switch ('EIQ') { case in_array($freeGift): $topMessage = "This is a free gift lead."; break; case in_array($endowment): $topMessage = "This is an endowment lead"; break; case in_array($cashback): $topMessage = "This is a life insurnace with cashback lead"; break; default: $topMessage = "This is a top quality life insurnace lead"; }
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: in_array() expects at least 2 parameters, 1 given in /in/98cYQ on line 11 Warning: in_array() expects at least 2 parameters, 1 given in /in/98cYQ on line 14 Warning: in_array() expects at least 2 parameters, 1 given in /in/98cYQ on line 17
Output for 4.3.0 - 5.2.17
Warning: Wrong parameter count for in_array() in /in/98cYQ on line 11 Warning: Wrong parameter count for in_array() in /in/98cYQ on line 14 Warning: Wrong parameter count for in_array() in /in/98cYQ on line 17