Skip to content

Instantly share code, notes, and snippets.

@josecanciani
Created August 12, 2019 21:09
Show Gist options
  • Save josecanciani/042c446a7fffb6904715287b363277cc to your computer and use it in GitHub Desktop.
Save josecanciani/042c446a7fffb6904715287b363277cc to your computer and use it in GitHub Desktop.
Performance analysis for exceptions in PHP (2)
$ time cat <<EOF | php
<?php
for (\$i = 0; \$i < 10000000; ++\$i) {
new Exception(\$i);
rand(\$i, \$i + 1000000);
}
EOF
real 0m2,824s
user 0m2,810s
sys 0m0,017s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment