Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- __autoload()



  Will PHP __autoload() function really affect performance?

IntroductionRegarding to PHP performance, the most frequently discussed is the __autoload() function. Many people say that this function will affect the performance very much, some other people say that opcode will affect __autoload() as well. So we will have some tests on these two.EnvironmentPHP 5.3.9 -- Launch under fastcgi modeNginx 1.1.12eAccelerator 0.9.6.1ScreenshotsLaunch pageeAccelerator(In php.ini) configurationFile structure(each Test file has over 6000 lines of code)Testing With e...

   PHP,__autoload(),opcode,performance     2012-05-09 11:25:26

  Highly efficient PHP code writing

Next are some tips for writing highly efficient PHP codes. They are described below: 0. Use single quote to replace double quote, this will be better since PHP will serach for variables in double quoted strings. Note, only echo can do this; 1. If we can define methods of a class as static, then do it. It will increase access speed by 4 times; 2. $row["id"] is 7 times faster than $row[id]; 3. echo is faster than print, and also use echo's multiple parameter format such as echo $str1,$str2 inst...

   PHP,Code writing,High efficient,Tips     2011-07-23 12:35:50

  Tips for improving PHP efficiency

0. Using single quote to replace double quote to enclose string literal, this will be a bit faster. Because PHP engine will search variables in double quoted string. 1. If a method in class can be declared as static, then make it static, this will be 4 times faster. 2. $row["id"] is 7 times faster than $row[id] 3. echo is faster than print, and you should use multiple parameters instead of string concatenation, i.e use comma(,) instead of dot(.) to concatenate string. For example echo $str1,$str...

   PHP, efficiency, tips     2012-10-01 19:39:06

  PHP: a fractal of bad design

Preface I’m cranky. I complain about a lot of things. There’s a lot in the world of technology I don’t like, and that’s really to be expected—programming is a hilariously young discipline, and none of us have the slightest clue what we’re doing. Combine with Sturgeon’s Law, and I have a lifetime’s worth of stuff to gripe about. This is not the same. PHP is not merely awkward to use, or ill-suited for what I want, or suboptimal, or...

   PHP,Design,Analysis     2012-04-11 13:46:57