Let $\mathscr{B}$ be a space of physics we have and $\mathscr{T}$ be the duration. Let $\mathscr{L}$ be a lagrangian density of the field such that the action is a functional of $\phi:\mathbb{R}^4\rightarrow\mathbb{R}$:
$$S=\int_{\mathscr{B} \times\mathscr{T}}d^4x\mathscr{L}(\phi(t,\vec{x}),\partial_\mu\phi(t,\vec{x}))$$ $$S=\int_{\mathscr{B} \times\mathscr{T}}d^4x\mathscr{L}(\phi(t,\vec{x}),\partial_\mu\phi(t,\vec{x})).\tag{1}$$
We can then derive the equations of motion: $$\frac{\delta S}{\delta \phi}=0$$ $$\frac{\delta S}{\delta \phi}=0.\tag{2}$$
Otherwise we can define the hamiltonian density $\mathscr{H}=\pi\dot\phi-\mathscr{L}=\mathscr{H}(\pi,\phi,\partial_i\phi)$$$\mathscr{H}=\pi\dot\phi-\mathscr{L}=\mathscr{H}(\pi,\phi,\partial_i\phi)\tag{3}$$ whereas $\pi=\frac{\partial\mathscr{L}}{\partial\dot\phi}$$$\pi=\frac{\partial\mathscr{L}}{\partial\dot\phi}\tag{4}$$ and $i=1.2.3$. Then the hamiltonian is a functional of $(\mathbb{R}^3\rightarrow\mathbb{R})$:
$$H(t)=\int_\mathscr{B} d^3x\mathscr{H}$$$$H(t)=\int_\mathscr{B} d^3x\mathscr{H}.\tag{5}$$ Let $\phi(t)$ and $\pi(t)$ be 2 functions $\mathbb{R}^3\rightarrow \mathbb{R}$. We define the Poisson bracket for 2 functionals $A[\phi,\pi]$ and $B[\phi,\pi]$: $$\{A,B\}=\frac{\delta A}{\delta\pi}\frac{\delta B}{\delta\phi}-\frac{\delta A}{\delta\phi}\frac{\delta B}{\delta\pi}$$$$\{A,B\}=\frac{\delta A}{\delta\pi}\frac{\delta B}{\delta\phi}-\frac{\delta A}{\delta\phi}\frac{\delta B}{\delta\pi}\tag{6}$$ and we have the canonical relation (for $t,\vec{x},\vec{y}$ fixed): $$\{\pi(t,\vec{x}),\phi(t,\vec{y})\}=\delta^{(3)}(\vec{x}-\vec{y})$$$$\{\pi(t,\vec{x}),\phi(t,\vec{y})\}=\delta^{(3)}(\vec{x}-\vec{y}).\tag{7}$$
How can we show that the equation of motions is now??:
$$\dot\pi=\{H,\pi\};\dot\phi=\{H,\phi\}$$$$\dot\pi=\{H,\pi\};\dot\phi=\{H,\phi\}~?\tag{8}$$