[4.2] Performances : Integer casting

Using `(int)` is much faster than `intval()`.
See bench : https://gist.github.com/lucasmichot/89a18524e10e2af42de3/revisions