cast before test, add bracket php