Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define("CHARACTERS", "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
- function RandomString() {
- $randstring = '';
- for ($i = 0; $i < 32; $i++) {
- $randstring .= CHARACTERS[rand(0, 61)];
- }
- return $randstring;
- }
- $time_start = time();
- for($i = 0; $i<1000000; $i++) {
- md5(RandomString());
- }
- $time_end = time();
- $execution_time = ($time_end - $time_start);
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta charset="UTF-8">
- <title>Test PHP Page</title>
- <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic&subset=latin,latin-ext,cyrillic-ext" rel="stylesheet" type="text/css">
- <link rel="stylesheet" href="/css/style.css">
- </head>
- <body>
- <div class="page-wrapper">
- <div id="page-content">This shit had <?php echo $execution_time; ?> seconds to execute</div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement