Skip to content

Instantly share code, notes, and snippets.

@manuel-rubio
Created July 1, 2015 16:11
Show Gist options
  • Save manuel-rubio/cc2445f6efd3acf7078a to your computer and use it in GitHub Desktop.
Save manuel-rubio/cc2445f6efd3acf7078a to your computer and use it in GitHub Desktop.

More Testing ephp

To continue testing ephp with the new features I release, first we need a fresh ephp version:

git clone https://github.com/altenwald/ephp
cd ephp
make

This generates an ephp command you can use it as follow:

./ephp test2.php

I attach in this git the test2.php code and the output.txt result.

You can find more examples here: code tests.

7540113804746346429
<?php
function fib($n) {
$num = 1;
$prev = 1;
$res = 0;
for ($i=0; $i<$n; $i++) {
$res = $num + $prev;
$prev = $num;
$num = $res;
}
return $res;
}
print fib(90) . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment