MakiMaki, that won't work. You can only use the isin operator to make one single comparison.
Scakk's suggestion makes the recommended approach. You can also combine them with the && operator:
if ($numeric == 318) && ($numeric == 312) { halt }
You can, however, use the $count():
if ($count($numeric,312,318)) { halt }
in place of the isin, but isin is not considered appropriate.