Back   Run bench2() first.
Source   Test Once   50 ints array - Testing for loop with -- and ++
for (--) x 1.26 faster 0.0529 for(++) 0.0665
Source   Test Once   50 ints array - Testing for loop with more complicated -- and ++
for (--) x 1.14 faster 0.0586 for(++) 0.0670
Source   Test Once   50 ints array - foreach (no keys) versus for
Foreach x 1.14 faster 0.0624For 0.0709
Source   Test Once   50 ints array - foreach (no keys) versus reset and next
Foreach 0.0633 Reset-Next x 1.08 faster 0.0588
Source   Test Once   50 ints array - foreach (no keys) vs list(¸$v)=each
Foreach x 1.54 faster 0.0689 List-Each 0.1063
Source   Test Once   50 ints array - foreach (with keys) vs list($k¸$v)=each
Foreach x 1.56 faster 0.0993 List-Each 0.1551
Source   Test Once   Testing foreach versus array_map with php function with 50 int element array
Foreach x 1.39 faster 0.0889 Array_Map 0.1239

Source   Test Once   50 strings array - Testing for loop with -- and ++
for (--) x 1.20 faster 0.0522 for(++) 0.0629
Source   Test Once   50 ints array - Testing for loop with more complicated -- and ++
for (--) x 1.16 faster 0.0562 for(++) 0.0653
Source   Test Once   50 strings array - foreach (no keys) versus for(++)
Foreach x 1.31 faster 0.0580For 0.0758
Source   Test Once   50 strings array - foreach (no keys) versus reset and next
Foreach x 1.12 faster 0.0593 Reset-Next 0.0662
Source   Test Once   50 strings array - foreach (no keys) vs list(¸$v)=each
Foreach x 1.79 faster 0.0576 List-Each 0.1029
Source   Test Once   50 strings array - foreach (with keys) vs list($k¸$v)=each
Foreach x 1.93 faster 0.0872 List-Each 0.1687
Source   Test Once   Testing foreach versus array_map with php function with 50 string element array
Foreach 0.0622 Array_Map x 1.07 faster 0.0584

Source   Test Once   Testing foreach with crc32 versus array_map with php function with 50 element array
Foreach 0.1036 Array_Map x 1.93 faster 0.0537

Testing PHP 5.0.0RC1 Completed on WINNT. Benchmark done on: 19-Mar-2004 11:00:02


(c) 2003-2004 John Lim PHP Benchmark Suite (PHP BS 1.01). Sponsored by Natsoft and Ormes.