|
||||||
| PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
Aside from the minor difference v0id pointed out there is a major difference in performance.
I've been reading a lot on optimizing my PHP code performance. In fact when I get time, maybe this weekend, I would like to do some in depth benchmarking on many PHP functions. When I was beginning PHP I found that there were many functions that do the same exact thing (neglecting minor differences) [include-require, str_replace-preg_replace, print-echo, ect...]. Your question was always in the back of my head. Which one is better? I never could figure out the answer, so I just randomly picked one. However, with my resent research, I've realized that there are major differences regarding optimization. Just the other day I read an article from Zend and it stated that include() is seven times slower than require() After that, I went back in my code and changed all my include()'s to require()'s because it even makes more sense in my case.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||||
|
Quote:
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages! |
| Sponsored Links |
|
|
|
|||||
|
Perhaps once it is Zend encoded there is a difference? Zend may be changing the response times of PHP functions somehow. It is hard to understand how once could be 7 times faster unless we are talking 1/7 Nano Seconds.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages! |
|
|||||
|
Quote:
Ill write an article on this because there is A LOT of tweeks people overlook such as: PHP Code:
PHP Code:
![]()
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall Last edited by John; 09-07-2007 at 05:40 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 97%