![]() Topic awaiting preservation: May I borrow your eyes? (Page 1 of 1)  | 
  |
|---|---|
| 
       Bipolar (III) Inmate From:   | 
    
       
  posted 10-19-2002 20:09
      
      php code  | 
  
| 
       Bipolar (III) Inmate From:   | 
    
       
  posted 10-19-2002 21:16
      
      Upon further investigation it seems I forgot a }.  | 
  
| 
       Maniac (V) Inmate From: Cell 666  | 
    
       
  posted 10-19-2002 22:51
      
      
     | 
  
| 
       Bipolar (III) Inmate From:   | 
    
       
  posted 10-19-2002 23:07
      
      Well, I am a relatively inexperienced PHP programmer, so if you can tell me a better/faster/cleaner way to do what I'm trying to do, I wouldn't mind borrowing them for a bit longer.  | 
  
| 
       Maniac (V) Inmate From: under the bed  | 
    
       
  posted 10-19-2002 23:30
      
      I'm quite inexperienced myself, but one *small* thing I would recommend is using a Switch() instead of an if() for simple things like the greeting bit.  It's faster and easier.    | 
  
| 
       Paranoid (IV) Mad Scientist From: Somewhere over the rainbow  | 
    
       
  posted 10-20-2002 09:04
      
      The poster has demanded we remove all his contributions, less he takes legal action.  | 
  
| 
       Paranoid (IV) Mad Scientist with Finglongers From: Germany  | 
    
       
  posted 10-20-2002 11:37
      
      well, I'm not 100% sure about php, but I know that in Pascal switch() (or case() as they call it) is, if used properly, many times faster than an if.  | 
  
| 
       Paranoid (IV) Mad Scientist From: Somewhere over the rainbow  | 
    
       
  posted 10-20-2002 12:32
      
      The poster has demanded we remove all his contributions, less he takes legal action.  | 
  
| 
       Maniac (V) Inmate From: under the bed  | 
    
       
  posted 10-20-2002 16:44
      
      I've always read and been told that switch was faster.    | 
  
| 
       Paranoid (IV) Inmate From: A graveyard of dreams  | 
    
       
  posted 10-20-2002 20:51
      
      I'm no expert, but I've been told by more learned friends that if is faster for small chains, but switch is faster on larger chains. But that is in C++, might be different in PHP.  | 
  
| 
       Bipolar (III) Inmate From:   | 
    
       
  posted 10-21-2002 14:54
      
      All this controversy...and started with a stupid missing }.  | 
  
| 
       Paranoid (IV) Mad Scientist From: Somewhere over the rainbow  | 
    
       
  posted 10-21-2002 15:29
      
      The poster has demanded we remove all his contributions, less he takes legal action.  | 
  
| 
       Maniac (V) Inmate From: under the bed  | 
    
       
  posted 10-21-2002 17:49
      
      
     | 
  
| 
       Maniac (V) Mad Scientist From: 100101010011 <-- right about here  | 
    
       
  posted 10-21-2002 19:41
      
      I was going to ask how he benchmarked his results but I found the source code for that test here  |