Created
February 6, 2013 17:01
-
-
Save nickl-/4724022 to your computer and use it in GitHub Desktop.
$ time php complex.php real 3m9.142s
user 0m32.125s
sys 0m0.358s
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 | |
| function foo() { return true; } | |
| function bar() { return true; } | |
| function baz() { return false; } | |
| function bat() { return true; } | |
| function lorem() { return true; } | |
| function ipsum() { return true; } | |
| function dolor() { return false; } | |
| function sit() { return false; } | |
| function amet() { return true; } | |
| function brown() { return true; } | |
| function fox() { static $rep = 0; return ++$rep%2; } | |
| class Lazy {} | |
| class Jumps | |
| { | |
| public $over; | |
| public function dog() {} | |
| } | |
| function example() { | |
| $jumps = new Jumps; | |
| if (foo() && bar() && (baz() || bat())) { | |
| lorem(); | |
| ipsum(); | |
| if (dolor() || sit() || amet()) { | |
| $quick = brown(); | |
| while (fox()) { | |
| $jumps->over = new Lazy; | |
| $jumps->dog(); | |
| } | |
| } | |
| } | |
| } | |
| foreach (range(0,1000000) as $i) | |
| example(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment