b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

phpecho_echo php用法_phpecho跳转页面(3)

电脑杂谈  发布时间:2017-04-28 00:05:39  来源:网络整理

Echo is an i/o process and i/o processes are typically time consuming。 For the longest time i have been outputting content by echoing as i get the data to output。 Therefore i might have hundreds of echoes in my document。 Recently, i have switched to concatenating all my string output together and then just doing one echo at the end。 This organizes the code more, and i do believe cuts down on a bit of time。 Likewise, i benchmark all my pages and echo seems to influence this as well。 At the top of the page i get the micro time, and at the end i figure out how long the page took to process。

With the old method of "echo as you go" the processing time seemed to be dependent on the user's net connection as well as the servers processing speed。 This was probably due to how echo works and the sending of packets of info back and forth to the user。 One an one script i was getting 。0004 secs on a cable modem, and a friend of mine in on dialup was getting 。2 secs。 Finally, to test that echo is slow; I built strings of XML and XSLT and used the PHP sablotron functions to do a transformation and return a new string。

I then echoed the string。phpecho Before the echo, the process time was around 。025 seconds and 。phpecho4 after the echo。 So if you are big into getting the actual processing time of your scripts, don't include echoes since they seem to be user dependent。 Note that this is just my experience and it could be a fluke。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-43880-3.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...