Created
April 3, 2013 12:38
-
-
Save frockenstein/5300811 to your computer and use it in GitHub Desktop.
php try catch
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 = microtime(true); | |
$loops = 10000000; | |
$herpes = new stdClass; | |
for ($i = 0; $i < $loops; $i++) { | |
try { | |
$herpes->mouthsores = true; | |
} catch (Exception $e) { } | |
} | |
$end = microtime(true); | |
$total = round($end - $start, 4); | |
echo "$total\n"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment