SHARE
TWEET

Untitled

a guest Dec 4th, 2010 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $number = 0;
  4. $instance['number'] = 2;
  5.  
  6.  
  7. $start = microtime( TRUE );
  8. if ( !$number = (int) $instance['number'] )
  9.     $number = 10;
  10. else if ( $number < 1 )    $number = 1;
  11. else if ( $number > 15 )
  12.     $number = 15;
  13.  
  14. #$number = isset ( $instance['number'] ) ? min ( max ( 1, ( int ) $instance['number'] ), 15 ) : 10;
  15.  
  16.  
  17.  
  18. $stop = microtime( TRUE );
  19. $time = $stop - $start;
  20.  
  21.  
  22. echo "instance: {$instance['number']}\n";
  23. echo "number: {$number}\n";
  24.  
  25. echo "Time : {$time}\n";
  26. echo 'Mem: ' . memory_get_peak_usage() . "\n";
  27. ~
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top