Last active
May 2, 2025 10:00
-
-
Save Muetze42/7f94259e57697a1f032c257d53c05f80 to your computer and use it in GitHub Desktop.
PHP Benchmark
This file contains hidden or 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 | |
| $start = hrtime(true); | |
| $mem = memory_get_usage(true); | |
| /** | |
| * Your awesome code her... | |
| */ | |
| echo 'T: ' . number_format((hrtime(true) - $start) / 1_000_000, 2). " s\n"; | |
| echo 'M: ' . number_format((memory_get_usage(true) - $mem) / (1024 * 1024), 2) . " MB\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment