Created
December 8, 2019 23:14
-
-
Save geekcom/94dccd42893135d9a9d7ee9e48e276a0 to your computer and use it in GitHub Desktop.
MyClassWithPreloading.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyClassWithPreloading | |
{ | |
public function helloPreloading() | |
{ | |
$start = microtime(true); | |
$value = 1; | |
while ($value < 1000000000) { | |
$value++; | |
} | |
echo 'Preloading: ' . number_format(microtime(true) - $start, 4) . PHP_EOL; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment