No it's not the same machine as I don't have any php running on my pc right now. However, I just tried the same javascript snippet in the Chrome console and it takes 179ms instead. As I said, it's a matter of optimization that is happening with the interpreter (Chrome doesn't run javascript the same way Firefox does, as not every php version will interpret php code the same way based on different versions and compile options)
Edit : Think about that : web browser are always on the cutting edge of javascript performance with the ton of javascript libraries that keep popping out each day. Everytime a new browser comes out, tons of bloggers test the javascript speed of those browsers so there is a lot of work going into optimizing javascript to make it as lightning-fast as possible.
On the other hand, PHP hasn't been pushed like that towards compile-time optimization so that's why Javascript can sometimes beat PHP in terms of speed tests.