Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $time = microtime(true);
- $x = 10000000;
- $string = '://aoeuaosreducraouasrocduouhecudsroeudraoheucoreuoeu';
- for ($i = 0; $i < $x; $i++) {
- if (strpos($string, 'http') === 0) {
- }
- }
- echo ((microtime(true) - $time) / $x) . PHP_EOL;
- $time = microtime(true);
- for ($i = 0; $i < $x; $i++) {
- if (substr($string, 0, 4) == 'http') {
- }
- }
- echo ((microtime(true) - $time) / $x) . PHP_EOL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement