Display a message is not giving result?
According to PHP manual


  A boolean TRUE value is converted to the string "1". Boolean FALSE is converted to "" (the empty string). This allows conversion back and forth between boolean and string values.


You can use below code instead

print ($is_mobile ? "TRUE" : "FALSE");