Implemented supervisors, refactored some stuff, implemented closures, updated examples and added dependency for Symfony\Process
This commit is contained in:
parent
84b89eaf9d
commit
1b8d2fb40a
18 changed files with 707 additions and 190 deletions
30
tests/no_tamer.php
Normal file
30
tests/no_tamer.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
|
||||
// Pi function (closure) loop 10 times
|
||||
for ($i = 0; $i < 50; $i++)
|
||||
{
|
||||
$start = microtime(true);
|
||||
$pi = 0;
|
||||
$top = 4;
|
||||
$bot = 1;
|
||||
$minus = true;
|
||||
$iterations = 1000000;
|
||||
|
||||
for ($i = 0; $i < $iterations; $i++)
|
||||
{
|
||||
if ($minus)
|
||||
{
|
||||
$pi = $pi - ($top / $bot);
|
||||
$minus = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pi = $pi + ($top / $bot);
|
||||
$minus = true;
|
||||
}
|
||||
|
||||
$bot += 2;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue