Assume WLOG that $\phi(x)>0$ when $x>0$. Since the limit described exists for all $x$ in the source of $f$. We get for any $x$ the bound: $f(x+\delta)-f(x) \leq C\phi(\delta)$ for $0 < \delta < \delta_0$ for some $C,\delta_0>0$ which may depend on $x$. diving by $\delta$ we get by the assumptions on $\phi$ that $\underline{\lim}_{\delta \to 0} ( \frac{f(x+\delta) - f(x)}{\delta}) \leq 0$ This is one the four derivatives of $f$, and proposition 2 chapter 5 in Real Analysis by H.L. Royden states that if $f$ is continuous then it is (non-strictly) decreasing. Similar for increasing. So $f$ is constant.