Let \(p:{{\mathbb {R}}}\rightarrow (1,\infty )\) be a bounded and continuous function. In this paper, we are concerned with the study of the positivity of the infimum \(\inf \limits _{u\in C_0^\infty (\Omega ){\setminus }\{0\}}\frac{\displaystyle {\int _\Omega }|\nabla u(x)|^{p(u(x))}\;dx}{\displaystyle {\int _\Omega }|u(x)|^{p(u(x))}\;dx}\,\) for all open and bounded domains \(\Omega \subset {{\mathbb {R}}}^N\) ( \(N\ge 1\) ). In particular, we give some sufficient conditions on the function p in order to get the positivity of the above infimum and we provide examples of functions p for which the infimum vanishes.