Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- const ITERATIONS_COUNT = 99999;
- $open = '<p style="display: none">';
- $close = '</p>';
- $time_start = microtime(true);
- for ($i = 0; $i < ITERATIONS_COUNT; $i++) {
- echo $open . $i . $close;
- }
- $timeOne = microtime(true) - $time_start;
- $time_start = microtime(true);
- for ($i = 0; $i < ITERATIONS_COUNT; $i++):?><p style="display: none"><?=$i?></p><?php endfor;
- $timeTwo = microtime(true) - $time_start;
- echo $timeOne . '|' . $timeTwo;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement