Just wrap $x in int()?
$or |= $x ; #change to => $or |= int($x); [download]
In reply to Re: Counter Intuitive Code by VinsWorldcom in thread Counter Intuitive Code by writch