Good pair vs. cofibration It can be shown that $i:A\hookrightarrow X$ is a closed cofibration if and only if there is a map $\varphi:X\to I=[0,1]$ and a homotopy $H:U\times I\to X$ on some neighborhood $U$ of $A$ such that


*

*$A=φ^{-1}(0)$ and $φ^{-1}([0,1))\subseteq U$

*$H(x,0)=x$, $H(a,t)=a$, and $H(x,1)\in A$ for all $x\in U, a\in A, t\in I$.


The last condition says that the neighborhood $U$ is deformable in $X$ to $A$. However, this seems to be different from $U$ deformation retracting to $A$ since the path $H(\{x\}×I)$ need not stay in $U$.
We can call $(X,A)$ a good pair (terminology from Hatcher's Algebraic Topology) if $A$ is a closed subspace of $X$ and some neighborhood $V$ deformation retracts to $A$.
I'd be interested to see an example of a closed cofibration which is not a good pair. Such an example would feature a neighborhood $U$ of $A$ whose inclusion in $X$ is homotopic to a retraction onto $A$ but for no neighborhood such a homotopy would stay within that set. At first I thought you could simply replace $U$ be the larger set $V=H[U\times I]$ and for each point $y\in V$ let the path start at $t_y$ the smallest point in time such that some $y=H(x,t_y)$ for some $x$ in $U$, and let $y$ be attached to $x$ on its path towards $A$, but this doesn't always give a well-defined map. In other words, the deformable neighborhood does not always give rise to a neighborhood which deformation retracts to $A$.
Of course if someone comes up with a good pair which is not cofibered, that would be nice, too. 
 A: Call a pair $(X,A)$ cofibred if $A$ is a closed subspace of $X$ and the inclusion $A\subseteq X$ has the homotopy extension property. I will produce examples of $(i)$ a good pair which is not cofibred, and $(ii)$ a cofibred pair which is not good. Neither example is my own, but they are not as well known as they should be.
A good pair which is not cofibred. Let $\Omega$ be an uncountable cardinal and consider the Tychonoff cube $I^\Omega$. The inclusion $0\hookrightarrow I^\Omega$ of the origin is evidently a strong deformation retract. Therefore the pair $(I^\Omega,\{0\})$ is good. However the pair is not cofibred. For if it were the point $0$ would be the zero-set of a continuous function $\varphi:I^\Omega\rightarrow I$, and this point is not even a G$_\delta$-set.
Discussion: The space $I^\Omega$ is a locally contractible compact $T_2$ space (which is separable when $\Omega\leq 2^{\aleph_0}$). As such it serves as a counterexample both in the category of all spaces and in the category of compactly generated spaces. The fact that the deformation retract of $I^\Omega$ onto $0$ can be chosen to fix $0$ at all times means that there is a homotopy equivalence of pairs $(I^\Omega,0)\simeq(0,0)$. Stated another way this reads; being well-pointed is not an invariant of pointed-homotopy type.
A cofibred pair which is not good. Sergey Melikhov describes here Borsuk's example of a 2-dimensional, compact, contractible metric space $M$ possessing the singularity of Mazurkiewicz. The original example is found on page 152 of Borsuk's book The Theory of Retracts. Our counterexample is its subspace, and here are the salient properties of $M$ which we will need to find it.
$1)$ $M$ is an absolute retract for metric spaces. Consequently, if $U\subset M$ is any open subset and $x\in U$ any point, then the inclusion $x\hookrightarrow U$ is a cofibration.
$2)$ $M$ is locally contractible in the sense that for any open $U\subseteq M$ and any $x\in U$, there is an open $V\subseteq U$ with $x\in V$ for which the inclusion $V\hookrightarrow U$ is null-homotopic. Still, $M$ is not a countable union of its contractible proper subsets. Since $M$ is a compact metric space it is separable and first-countable, and consequently $M$ has points which do not possess a base of contractible neighbourhoods.
We turn to our construction. Fix any point $x_0\in M$ which does not have a base of contractible neighbourhoods and let $\{U_n\}_\mathbb{N}$ be a neighbourhood base at $x_0$. We can assume that the $U_n$'s form a decreasing sequence of noncontractible open sets.
Claim: There is $n\in\mathbb{N}$ such that $(U_n,x_0)$ is not a good pair.
This is verified by exhaustion. If $(U_1,x_0)$ is not a good pair, then we are done. Thus suppose that $(U_1,x_0)$ is a good pair. This means that $x_0$ has a contractible neighbouhood $V_1\subseteq U_1$. Then using the fact that the $U_n$'s form a neighbourhood base at $x_0$ we find $n\in\mathbb{N}$ such that $U_n\subseteq V_1$. Now repeat the argument with $(U_n,x_0)$. If this pair is good we stop, and if not we have $U_m\subseteq V_n\subseteq U_n$, where $m>n$ and $V_n$ is a contractible neighbourhood of $x$.
Now, this process must terminate to yield a non-good pair. For if it did not we could re-enumerate the $V_n$'s and $U_n$'s to obtain a sequence $\{V_n\}_\mathbb{N}$ of contractible open neighbourhoods of $x_0$ such that $V_n\subseteq U_n$ for each $n\in\mathbb{N}$. Because $\{U_n\}_\mathbb{N}$ is a base at $x_0$, so would be $\{V_n\}_\mathbb{N}$, and this contradicts the fact that $x_0$ does not have a base of contractible neighbourhoods. $\square$
The end result is the presence of a noncontractible open $X\subseteq M$ which contains $x_0$, and is such that $(X,x_0)$ is not good. But $X$, being an open subset of an absolute retract, is itself an absolute neighbourhood retract. As was discussed above, a consequence of this is that the inclusion $x_0\hookrightarrow X$ is a cofibration. Thus we have obtained a cofibred pair $(X,x_0)$ which is not good.
Discussion: The space $X$ is a locally contractible (in the above sense) separable 2-dimensional metric space. In any case $(X,x_0)$ is a counterexample in the categories of all spaces, compactly generated spaces, and $\Delta$-generated spaces.
Note that $X$ has the pointed homotopy type of a countable, finite-dimensional CW complex. Thus not even in the category of well-pointed spaces is being a good pair an invariant of pointed homotopy type.
