|
|
|
|
|
by TazeTSchnitzel
3938 days ago
|
|
> It is not much worse than using it in javascript. 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. |
|