measurement

How can I measure the speed of code written in PHP?

早过忘川 提交于 2019-11-25 23:48:22
问题 How can I say which class of many (which all do the same job) execute faster? is there a software to measure that? 回答1: You have (at least) two solutions : The quite "naïve" one is using microtime(true) tobefore and after a portion of code, to get how much time has passed during its execution ; other answers said that and gave examples already, so I won"t say much more. This is a nice solution if you want to benchmark a couple of instructions ; like compare two types of functions, for