It is worse because people are even less familiar with this in PHP. It's not idiomatic.
> I just tested it in PHP and it seems it is 20% faster in PHP compared to casting to int.
How rigorous was your testing? Which version of PHP were you using?
> It makes sense in javascript to that its faster than functions, but why it is faster than a cast in PHP?
It shouldn't be. It might save an allocation in older PHP versions, I'm not sure.
It is worse because people are even less familiar with this in PHP. It's not idiomatic.
> I just tested it in PHP and it seems it is 20% faster in PHP compared to casting to int.
How rigorous was your testing? Which version of PHP were you using?
> It makes sense in javascript to that its faster than functions, but why it is faster than a cast in PHP?
It shouldn't be. It might save an allocation in older PHP versions, I'm not sure.