Skip to content

Instantly share code, notes, and snippets.

@bendavies
Created September 12, 2017 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bendavies/68ee6b263c8c61fb4637e99a250aa1b5 to your computer and use it in GitHub Desktop.
Save bendavies/68ee6b263c8c61fb4637e99a250aa1b5 to your computer and use it in GitHub Desktop.
<?php
namespace Foo;
$a = [];
$start = microtime(true);
for ($i = 0; $i <= 1000000000; $i++) {
is_array($a);
}
echo microtime(true) - $start . PHP_EOL;
$start = microtime(true);
for ($i = 0; $i <= 1000000000; $i++) {
\is_array($a);
}
echo microtime(true) - $start . PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment