3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /** * Various methods of computing Fibonacci numbers in PHP */ class Fibonacci { /** * @var array Memoization cache * @see Fibonacci::memoized */ protected $cache = array(0 => 0, 1 => 1); /** * Fibonacci using recursion */ public function recursive($n) { if ($n == 0) { return 0; } if ($n == 1) { return 1; } return $this->recursive($n - 1) + $this->recursive($n - 2); } /** * Fibonacci using an iterative approach */ public function iterative($n) { $a = 0; $b = 1; for ($i = 0; $i < $n; $i++) { $c = $a; $a = $b; $b += $c; } return $a; } /** * Fibonacci using Binet's formula * @link http://mathworld.wolfram.com/BinetsFibonacciNumberFormula.html */ public function binet($n) { $phi = (1 + sqrt(5)) / 2; return (pow($phi, $n) - pow(1 - $phi, $n)) / sqrt(5); } /** * Fibonacci using a cache */ public function memoized($n) { if (!isset($this->cache[$n])) { $this->cache[$n] = $this->memoized($n - 1) + $this->memoized($n - 2); } return $this->cache[$n]; } } /** * Test each Fibonacci method and output the speed */ function test($total, $callback) { echo $callback[1] . ":\n"; $t = microtime(true); for ($x = 0; $x < $total; $x++) { call_user_func($callback, $x); } $finish = microtime(true) - $t; echo ($finish * 1000) . ' ms (' . (($finish / $total) * 1000) . ")\n\n"; } // You can pass in the total number of sequences to calculate as a CLI argument $total = isset($argv[1]) ? $argv[1] : 25; $fib = new Fibonacci(); test($total, array($fib, 'iterative')); test($total, array($fib, 'binet')); test($total, array($fib, 'memoized')); // Limit our attempts with recursion if ($total <= 30) { test($total, array($fib, 'recursive')); }
Output for 7.1.0
iterative: 0.018835067749023 ms (0.00075340270996094) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.017881393432617 ms (0.00071525573730469) recursive: 21.41284942627 ms (0.85651397705078)
Output for 7.0.14
iterative: 0.028133392333984 ms (0.0011253356933594) binet: 0.058889389038086 ms (0.0023555755615234) memoized: 0.018119812011719 ms (0.00072479248046875) recursive: 23.555040359497 ms (0.94220161437988)
Output for 7.0.12
iterative: 0.016927719116211 ms (0.00067710876464844) binet: 0.03504753112793 ms (0.0014019012451172) memoized: 0.014066696166992 ms (0.00056266784667969) recursive: 18.070936203003 ms (0.72283744812012)
Output for 7.0.6
iterative: 0.018119812011719 ms (0.00072479248046875) binet: 0.030994415283203 ms (0.0012397766113281) memoized: 0.015020370483398 ms (0.00060081481933594) recursive: 15.347003936768 ms (0.6138801574707)
Output for 7.0.5
iterative: 0.017881393432617 ms (0.00071525573730469) binet: 0.042200088500977 ms (0.0016880035400391) memoized: 0.015020370483398 ms (0.00060081481933594) recursive: 20.16282081604 ms (0.8065128326416)
Output for 7.0.4
iterative: 0.014066696166992 ms (0.00056266784667969) binet: 0.030040740966797 ms (0.0012016296386719) memoized: 0.010967254638672 ms (0.00043869018554688) recursive: 13.750791549683 ms (0.5500316619873)
Output for 7.0.3
iterative: 0.015974044799805 ms (0.00063896179199219) binet: 0.030994415283203 ms (0.0012397766113281) memoized: 0.013113021850586 ms (0.00052452087402344) recursive: 16.126155853271 ms (0.64504623413086)
Output for 7.0.2
iterative: 0.021934509277344 ms (0.00087738037109375) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.026941299438477 ms (0.0010776519775391) recursive: 20.349025726318 ms (0.81396102905273)
Output for 7.0.1
iterative: 0.017881393432617 ms (0.00071525573730469) binet: 0.037908554077148 ms (0.0015163421630859) memoized: 0.020027160644531 ms (0.00080108642578125) recursive: 21.255970001221 ms (0.85023880004883)
Output for 7.0.0
iterative: 0.013113021850586 ms (0.00052452087402344) binet: 0.030040740966797 ms (0.0012016296386719) memoized: 0.010967254638672 ms (0.00043869018554688) recursive: 14.723062515259 ms (0.58892250061035)
Output for 5.6.21
iterative: 0.066041946411133 ms (0.0026416778564453) binet: 0.10299682617188 ms (0.004119873046875) memoized: 0.052928924560547 ms (0.0021171569824219) recursive: 64.383029937744 ms (2.5753211975098)
Output for 5.6.20
iterative: 0.065088272094727 ms (0.0026035308837891) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 62.728881835938 ms (2.5091552734375)
Output for 5.6.19
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.037908554077148 ms (0.0015163421630859) memoized: 0.02288818359375 ms (0.00091552734375) recursive: 47.386884689331 ms (1.8954753875732)
Output for 5.6.18
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.025033950805664 ms (0.0010013580322266) recursive: 47.667980194092 ms (1.9067192077637)
Output for 5.6.17
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.040054321289062 ms (0.0016021728515625) recursive: 57.940006256104 ms (2.3176002502441)
Output for 5.6.16
iterative: 0.036954879760742 ms (0.0014781951904297) binet: 0.043869018554688 ms (0.0017547607421875) memoized: 0.029087066650391 ms (0.0011634826660156) recursive: 48.705101013184 ms (1.9482040405273)
Output for 5.6.15
iterative: 0.046968460083008 ms (0.0018787384033203) binet: 0.054121017456055 ms (0.0021648406982422) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 56.888103485107 ms (2.2755241394043)
Output for 5.6.14
iterative: 0.046968460083008 ms (0.0018787384033203) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 59.040069580078 ms (2.3616027832031)
Output for 5.6.13
iterative: 0.043153762817383 ms (0.0017261505126953) binet: 0.051021575927734 ms (0.0020408630371094) memoized: 0.032901763916016 ms (0.0013160705566406) recursive: 54.244995117188 ms (2.1697998046875)
Output for 5.6.12
iterative: 0.075101852416992 ms (0.0030040740966797) binet: 0.067949295043945 ms (0.0027179718017578) memoized: 0.046014785766602 ms (0.0018405914306641) recursive: 64.487934112549 ms (2.579517364502)
Output for 5.6.11
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 61.661005020142 ms (2.4664402008057)
Output for 5.6.10
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.060796737670898 ms (0.0024318695068359) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 62.252998352051 ms (2.490119934082)
Output for 5.6.9
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.054121017456055 ms (0.0021648406982422) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 49.962997436523 ms (1.9985198974609)
Output for 5.6.8
iterative: 0.060796737670898 ms (0.0024318695068359) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.046968460083008 ms (0.0018787384033203) recursive: 63.638925552368 ms (2.5455570220947)
Output for 5.5.35
iterative: 0.036954879760742 ms (0.0014781951904297) binet: 0.046968460083008 ms (0.0018787384033203) memoized: 0.028133392333984 ms (0.0011253356933594) recursive: 47.833919525146 ms (1.9133567810059)
Output for 5.5.34
iterative: 0.037908554077148 ms (0.0015163421630859) binet: 0.049114227294922 ms (0.0019645690917969) memoized: 0.030994415283203 ms (0.0012397766113281) recursive: 48.135042190552 ms (1.9254016876221)
Output for 5.5.33
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 61.609983444214 ms (2.4643993377686)
Output for 5.5.32
iterative: 0.036001205444336 ms (0.0014400482177734) binet: 0.044822692871094 ms (0.0017929077148438) memoized: 0.027894973754883 ms (0.0011157989501953) recursive: 50.018072128296 ms (2.0007228851318)
Output for 5.5.31
iterative: 0.04887580871582 ms (0.0019550323486328) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 59.876918792725 ms (2.395076751709)
Output for 5.5.30
iterative: 0.030994415283203 ms (0.0012397766113281) binet: 0.036954879760742 ms (0.0014781951904297) memoized: 0.024080276489258 ms (0.00096321105957031) recursive: 43.586015701294 ms (1.7434406280518)
Output for 5.5.29
iterative: 0.04887580871582 ms (0.0019550323486328) binet: 0.06103515625 ms (0.00244140625) memoized: 0.037193298339844 ms (0.0014877319335938) recursive: 63.730001449585 ms (2.5492000579834)
Output for 5.5.28
iterative: 0.068902969360352 ms (0.0027561187744141) binet: 0.067949295043945 ms (0.0027179718017578) memoized: 0.058889389038086 ms (0.0023555755615234) recursive: 63.53497505188 ms (2.5413990020752)
Output for 5.5.27
iterative: 0.032186508178711 ms (0.0012874603271484) binet: 0.039815902709961 ms (0.0015926361083984) memoized: 0.024080276489258 ms (0.00096321105957031) recursive: 48.740148544312 ms (1.9496059417725)
Output for 5.5.26
iterative: 0.038862228393555 ms (0.0015544891357422) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.032901763916016 ms (0.0013160705566406) recursive: 50.580978393555 ms (2.0232391357422)
Output for 5.5.25
iterative: 0.036001205444336 ms (0.0014400482177734) binet: 0.043869018554688 ms (0.0017547607421875) memoized: 0.028848648071289 ms (0.0011539459228516) recursive: 46.426057815552 ms (1.8570423126221)
Output for 5.5.24
iterative: 0.027179718017578 ms (0.0010871887207031) binet: 0.034093856811523 ms (0.0013637542724609) memoized: 0.021934509277344 ms (0.00087738037109375) recursive: 38.541078567505 ms (1.5416431427002)
Output for 5.4.45
iterative: 0.030994415283203 ms (0.0012397766113281) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.026941299438477 ms (0.0010776519775391) recursive: 46.263933181763 ms (1.8505573272705)
Output for 5.4.44
iterative: 0.048160552978516 ms (0.0019264221191406) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.039815902709961 ms (0.0015926361083984) recursive: 55.747985839844 ms (2.2299194335938)
Output for 5.4.43
iterative: 0.046014785766602 ms (0.0018405914306641) binet: 0.051021575927734 ms (0.0020408630371094) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 45.371055603027 ms (1.8148422241211)
Output for 5.4.42
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 60.867071151733 ms (2.4346828460693)
Output for 5.4.41
iterative: 0.033140182495117 ms (0.0013256072998047) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.028133392333984 ms (0.0011253356933594) recursive: 42.858123779297 ms (1.7143249511719)
Output for 5.4.40
iterative: 0.056982040405273 ms (0.0022792816162109) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.042200088500977 ms (0.0016880035400391) recursive: 55.973052978516 ms (2.2389221191406)
Output for 5.4.39
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.044107437133789 ms (0.0017642974853516) recursive: 60.573816299438 ms (2.4229526519775)
Output for 5.4.38
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 61.12813949585 ms (2.445125579834)
Output for 5.4.37
iterative: 0.033140182495117 ms (0.0013256072998047) binet: 0.060796737670898 ms (0.0024318695068359) memoized: 0.046014785766602 ms (0.0018405914306641) recursive: 67.260026931763 ms (2.6904010772705)
Output for 5.4.36
iterative: 0.068902969360352 ms (0.0027561187744141) binet: 0.074148178100586 ms (0.0029659271240234) memoized: 0.048160552978516 ms (0.0019264221191406) recursive: 61.146020889282 ms (2.4458408355713)
Output for 5.4.35
iterative: 0.048160552978516 ms (0.0019264221191406) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.039815902709961 ms (0.0015926361083984) recursive: 55.855989456177 ms (2.2342395782471)
Output for 5.4.34
iterative: 0.062942504882812 ms (0.0025177001953125) binet: 0.06103515625 ms (0.00244140625) memoized: 0.046968460083008 ms (0.0018787384033203) recursive: 54.364919662476 ms (2.174596786499)
Output for 5.4.32
iterative: 0.03814697265625 ms (0.00152587890625) binet: 0.049829483032227 ms (0.0019931793212891) memoized: 0.033140182495117 ms (0.0013256072998047) recursive: 47.634840011597 ms (1.9053936004639)
Output for 5.4.31
iterative: 0.054121017456055 ms (0.0021648406982422) binet: 0.070810317993164 ms (0.0028324127197266) memoized: 0.0457763671875 ms (0.0018310546875) recursive: 65.330028533936 ms (2.6132011413574)
Output for 5.4.30
iterative: 0.036001205444336 ms (0.0014400482177734) binet: 0.050067901611328 ms (0.0020027160644531) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 44.63791847229 ms (1.7855167388916)
Output for 5.4.29
iterative: 0.054121017456055 ms (0.0021648406982422) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 58.880090713501 ms (2.35520362854)
Output for 5.4.28
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.040054321289062 ms (0.0016021728515625) memoized: 0.026941299438477 ms (0.0010776519775391) recursive: 41.869163513184 ms (1.6747665405273)
Output for 5.4.27
iterative: 0.04887580871582 ms (0.0019550323486328) binet: 0.064849853515625 ms (0.002593994140625) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 58.720827102661 ms (2.3488330841064)
Output for 5.4.26
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.058889389038086 ms (0.0023555755615234) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 59.556007385254 ms (2.3822402954102)
Output for 5.4.25
iterative: 0.042915344238281 ms (0.0017166137695312) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 52.201986312866 ms (2.0880794525146)
Output for 5.4.24
iterative: 0.06413459777832 ms (0.0025653839111328) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.050067901611328 ms (0.0020027160644531) recursive: 61.269998550415 ms (2.4507999420166)
Output for 5.4.23
iterative: 0.032901763916016 ms (0.0013160705566406) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.029087066650391 ms (0.0011634826660156) recursive: 42.675018310547 ms (1.7070007324219)
Output for 5.4.22
iterative: 0.080108642578125 ms (0.003204345703125) binet: 0.068902969360352 ms (0.0027561187744141) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 59.767007827759 ms (2.3906803131104)
Output for 5.4.21
iterative: 0.062942504882812 ms (0.0025177001953125) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.046968460083008 ms (0.0018787384033203) recursive: 58.46095085144 ms (2.3384380340576)
Output for 5.4.20
iterative: 0.053882598876953 ms (0.0021553039550781) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.043869018554688 ms (0.0017547607421875) recursive: 60.112953186035 ms (2.4045181274414)
Output for 5.4.19
iterative: 0.042915344238281 ms (0.0017166137695312) binet: 0.055074691772461 ms (0.0022029876708984) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 54.66103553772 ms (2.1864414215088)
Output for 5.4.18
iterative: 0.049114227294922 ms (0.0019645690917969) binet: 0.058174133300781 ms (0.0023269653320312) memoized: 0.040054321289062 ms (0.0016021728515625) recursive: 54.831981658936 ms (2.1932792663574)
Output for 5.4.17
iterative: 0.064849853515625 ms (0.002593994140625) binet: 0.064849853515625 ms (0.002593994140625) memoized: 0.047922134399414 ms (0.0019168853759766) recursive: 59.779167175293 ms (2.3911666870117)
Output for 5.4.16
iterative: 0.042915344238281 ms (0.0017166137695312) binet: 0.051975250244141 ms (0.0020790100097656) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 53.261041641235 ms (2.1304416656494)
Output for 5.4.15
iterative: 0.055074691772461 ms (0.0022029876708984) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 61.122894287109 ms (2.4449157714844)
Output for 5.4.14
iterative: 0.066995620727539 ms (0.0026798248291016) binet: 0.066995620727539 ms (0.0026798248291016) memoized: 0.051021575927734 ms (0.0020408630371094) recursive: 62.230825424194 ms (2.4892330169678)
Output for 5.4.13
iterative: 0.060081481933594 ms (0.0024032592773438) binet: 0.076055526733398 ms (0.0030422210693359) memoized: 0.049829483032227 ms (0.0019931793212891) recursive: 59.513092041016 ms (2.3805236816406)
Output for 5.4.12
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.059127807617188 ms (0.0023651123046875) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 67.291975021362 ms (2.6916790008545)
Output for 5.4.11
iterative: 0.064849853515625 ms (0.002593994140625) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.043869018554688 ms (0.0017547607421875) recursive: 49.280881881714 ms (1.9712352752686)
Output for 5.4.10
iterative: 0.055074691772461 ms (0.0022029876708984) binet: 0.052928924560547 ms (0.0021171569824219) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 65.659999847412 ms (2.6263999938965)
Output for 5.4.9
iterative: 0.03814697265625 ms (0.00152587890625) binet: 0.045061111450195 ms (0.0018024444580078) memoized: 0.031948089599609 ms (0.0012779235839844) recursive: 46.788930892944 ms (1.8715572357178)
Output for 5.4.8
iterative: 0.04887580871582 ms (0.0019550323486328) binet: 0.052928924560547 ms (0.0021171569824219) memoized: 0.033855438232422 ms (0.0013542175292969) recursive: 53.990125656128 ms (2.1596050262451)
Output for 5.4.7
iterative: 0.039100646972656 ms (0.0015640258789062) binet: 0.051975250244141 ms (0.0020790100097656) memoized: 0.032901763916016 ms (0.0013160705566406) recursive: 55.087089538574 ms (2.203483581543)
Output for 5.4.6
iterative: 0.062942504882812 ms (0.0025177001953125) binet: 0.054121017456055 ms (0.0021648406982422) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 55.970907211304 ms (2.2388362884521)
Output for 5.4.5
iterative: 0.04887580871582 ms (0.0019550323486328) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 59.002876281738 ms (2.3601150512695)
Output for 5.4.4
iterative: 0.041961669921875 ms (0.001678466796875) binet: 0.047206878662109 ms (0.0018882751464844) memoized: 0.032901763916016 ms (0.0013160705566406) recursive: 41.975021362305 ms (1.6790008544922)
Output for 5.4.3
iterative: 0.049114227294922 ms (0.0019645690917969) binet: 0.043869018554688 ms (0.0017547607421875) memoized: 0.031948089599609 ms (0.0012779235839844) recursive: 42.97399520874 ms (1.7189598083496)
Output for 5.4.2
iterative: 0.041961669921875 ms (0.001678466796875) binet: 0.052213668823242 ms (0.0020885467529297) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 54.324865341187 ms (2.1729946136475)
Output for 5.4.1
iterative: 0.041007995605469 ms (0.0016403198242188) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 54.342985153198 ms (2.1737194061279)
Output for 5.4.0
iterative: 0.062942504882812 ms (0.0025177001953125) binet: 0.066995620727539 ms (0.0026798248291016) memoized: 0.052928924560547 ms (0.0021171569824219) recursive: 47.590017318726 ms (1.903600692749)
Output for 5.3.29
iterative: 0.046968460083008 ms (0.0018787384033203) binet: 0.044107437133789 ms (0.0017642974853516) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 64.668893814087 ms (2.5867557525635)
Output for 5.3.28
iterative: 0.074148178100586 ms (0.0029659271240234) binet: 0.073909759521484 ms (0.0029563903808594) memoized: 0.070095062255859 ms (0.0028038024902344) recursive: 91.159105300903 ms (3.6463642120361)
Output for 5.3.27
iterative: 0.072002410888672 ms (0.0028800964355469) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.055074691772461 ms (0.0022029876708984) recursive: 87.565898895264 ms (3.5026359558105)
Output for 5.3.26
iterative: 0.055074691772461 ms (0.0022029876708984) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.04887580871582 ms (0.0019550323486328) recursive: 86.286067962646 ms (3.4514427185059)
Output for 5.3.25
iterative: 0.041961669921875 ms (0.001678466796875) binet: 0.050067901611328 ms (0.0020027160644531) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 65.7958984375 ms (2.6318359375)
Output for 5.3.24
iterative: 0.058889389038086 ms (0.0023555755615234) binet: 0.072956085205078 ms (0.0029182434082031) memoized: 0.053882598876953 ms (0.0021553039550781) recursive: 96.429109573364 ms (3.8571643829346)
Output for 5.3.23
iterative: 0.04887580871582 ms (0.0019550323486328) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 71.528196334839 ms (2.8611278533936)
Output for 5.3.22
iterative: 0.059127807617188 ms (0.0023651123046875) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.053882598876953 ms (0.0021553039550781) recursive: 86.321115493774 ms (3.452844619751)
Output for 5.3.21
iterative: 0.044822692871094 ms (0.0017929077148438) binet: 0.051021575927734 ms (0.0020408630371094) memoized: 0.039815902709961 ms (0.0015926361083984) recursive: 71.435928344727 ms (2.8574371337891)
Output for 5.3.20
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.051021575927734 ms (0.0020408630371094) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 75.448989868164 ms (3.0179595947266)
Output for 5.3.19
iterative: 0.056028366088867 ms (0.0022411346435547) binet: 0.052928924560547 ms (0.0021171569824219) memoized: 0.046968460083008 ms (0.0018787384033203) recursive: 72.504997253418 ms (2.9001998901367)
Output for 5.3.18
iterative: 0.043869018554688 ms (0.0017547607421875) binet: 0.10204315185547 ms (0.0040817260742188) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 77.26788520813 ms (3.0907154083252)
Output for 5.3.17
iterative: 0.053882598876953 ms (0.0021553039550781) binet: 0.051975250244141 ms (0.0020790100097656) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 74.6169090271 ms (2.984676361084)
Output for 5.3.16
iterative: 0.048160552978516 ms (0.0019264221191406) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.040054321289062 ms (0.0016021728515625) recursive: 73.127031326294 ms (2.9250812530518)
Output for 5.3.15
iterative: 0.066041946411133 ms (0.0026416778564453) binet: 0.06103515625 ms (0.00244140625) memoized: 0.053882598876953 ms (0.0021553039550781) recursive: 88.72389793396 ms (3.5489559173584)
Output for 5.3.14
iterative: 0.056982040405273 ms (0.0022792816162109) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.04887580871582 ms (0.0019550323486328) recursive: 86.053848266602 ms (3.4421539306641)
Output for 5.3.13
iterative: 0.078916549682617 ms (0.0031566619873047) binet: 0.070095062255859 ms (0.0028038024902344) memoized: 0.059843063354492 ms (0.0023937225341797) recursive: 91.225862503052 ms (3.6490345001221)
Output for 5.3.12
iterative: 0.06103515625 ms (0.00244140625) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.053167343139648 ms (0.0021266937255859) recursive: 89.194059371948 ms (3.5677623748779)
Output for 5.3.11
iterative: 0.036954879760742 ms (0.0014781951904297) binet: 0.055074691772461 ms (0.0022029876708984) memoized: 0.033855438232422 ms (0.0013542175292969) recursive: 91.937065124512 ms (3.6774826049805)
Output for 5.3.10
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.049114227294922 ms (0.0019645690917969) recursive: 85.000991821289 ms (3.4000396728516)
Output for 5.3.9
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.052213668823242 ms (0.0020885467529297) memoized: 0.043869018554688 ms (0.0017547607421875) recursive: 69.367170333862 ms (2.7746868133545)
Output for 5.3.8
iterative: 0.056982040405273 ms (0.0022792816162109) binet: 0.06103515625 ms (0.00244140625) memoized: 0.04887580871582 ms (0.0019550323486328) recursive: 96.923112869263 ms (3.8769245147705)
Output for 5.3.7
iterative: 0.06413459777832 ms (0.0025653839111328) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.056982040405273 ms (0.0022792816162109) recursive: 81.471920013428 ms (3.2588768005371)
Output for 5.3.6
iterative: 0.065803527832031 ms (0.0026321411132812) binet: 0.075101852416992 ms (0.0030040740966797) memoized: 0.054121017456055 ms (0.0021648406982422) recursive: 80.657958984375 ms (3.226318359375)
Output for 5.3.5
iterative: 0.054121017456055 ms (0.0021648406982422) binet: 0.068902969360352 ms (0.0027561187744141) memoized: 0.04887580871582 ms (0.0019550323486328) recursive: 84.940910339355 ms (3.3976364135742)
Output for 5.3.4
iterative: 0.056028366088867 ms (0.0022411346435547) binet: 0.090837478637695 ms (0.0036334991455078) memoized: 0.097990036010742 ms (0.0039196014404297) recursive: 89.170932769775 ms (3.566837310791)
Output for 5.3.3
iterative: 0.072002410888672 ms (0.0028800964355469) binet: 0.066995620727539 ms (0.0026798248291016) memoized: 0.058889389038086 ms (0.0023555755615234) recursive: 88.91487121582 ms (3.5565948486328)
Output for 5.3.2
iterative: 0.077009201049805 ms (0.0030803680419922) binet: 0.065803527832031 ms (0.0026321411132812) memoized: 0.040054321289062 ms (0.0016021728515625) recursive: 76.663970947266 ms (3.0665588378906)
Output for 5.3.1
iterative: 0.058174133300781 ms (0.0023269653320312) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.051975250244141 ms (0.0020790100097656) recursive: 90.559959411621 ms (3.6223983764648)
Output for 5.3.0
iterative: 0.036001205444336 ms (0.0014400482177734) binet: 0.042915344238281 ms (0.0017166137695312) memoized: 0.033140182495117 ms (0.0013256072998047) recursive: 67.094087600708 ms (2.6837635040283)
Output for 5.2.17
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.052928924560547 ms (0.0021171569824219) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 88.680028915405 ms (3.5472011566162)
Output for 5.2.16
iterative: 0.12087821960449 ms (0.0048351287841797) binet: 0.080108642578125 ms (0.003204345703125) memoized: 0.067949295043945 ms (0.0027179718017578) recursive: 120.00203132629 ms (4.8000812530518)
Output for 5.2.15
iterative: 0.10204315185547 ms (0.0040817260742188) binet: 0.081062316894531 ms (0.0032424926757812) memoized: 0.070095062255859 ms (0.0028038024902344) recursive: 119.26698684692 ms (4.770679473877)
Output for 5.2.14
iterative: 0.077962875366211 ms (0.0031185150146484) binet: 0.058174133300781 ms (0.0023269653320312) memoized: 0.076055526733398 ms (0.0030422210693359) recursive: 95.475912094116 ms (3.8190364837646)
Output for 5.2.13
iterative: 0.092029571533203 ms (0.0036811828613281) binet: 0.080108642578125 ms (0.003204345703125) memoized: 0.066995620727539 ms (0.0026798248291016) recursive: 114.59898948669 ms (4.5839595794678)
Output for 5.2.12
iterative: 0.091075897216797 ms (0.0036430358886719) binet: 0.075101852416992 ms (0.0030040740966797) memoized: 0.066995620727539 ms (0.0026798248291016) recursive: 118.34383010864 ms (4.7337532043457)
Output for 5.2.11
iterative: 0.10800361633301 ms (0.0043201446533203) binet: 0.089168548583984 ms (0.0035667419433594) memoized: 0.10204315185547 ms (0.0040817260742188) recursive: 107.12909698486 ms (4.2851638793945)
Output for 5.2.10
iterative: 0.11992454528809 ms (0.0047969818115234) binet: 0.085115432739258 ms (0.0034046173095703) memoized: 0.073909759521484 ms (0.0029563903808594) recursive: 119.96698379517 ms (4.7986793518066)
Output for 5.2.9
iterative: 0.061988830566406 ms (0.0024795532226562) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 89.54906463623 ms (3.5819625854492)
Output for 5.2.8
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.048160552978516 ms (0.0019264221191406) memoized: 0.037193298339844 ms (0.0014877319335938) recursive: 87.821960449219 ms (3.5128784179688)
Output for 5.2.7
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 87.859869003296 ms (3.5143947601318)
Output for 5.2.6
iterative: 0.053882598876953 ms (0.0021553039550781) binet: 0.06103515625 ms (0.00244140625) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 87.062835693359 ms (3.4825134277344)
Output for 5.2.5
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 87.203979492188 ms (3.4881591796875)
Output for 5.2.4
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.045061111450195 ms (0.0018024444580078) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 86.580991744995 ms (3.4632396697998)
Output for 5.2.3
iterative: 0.052213668823242 ms (0.0020885467529297) binet: 0.042915344238281 ms (0.0017166137695312) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 87.276935577393 ms (3.4910774230957)
Output for 5.2.2
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.045061111450195 ms (0.0018024444580078) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 83.977937698364 ms (3.3591175079346)
Output for 5.2.1
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.050067901611328 ms (0.0020027160644531) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 86.265087127686 ms (3.4506034851074)
Output for 5.2.0
iterative: 0.05793571472168 ms (0.0023174285888672) binet: 0.046968460083008 ms (0.0018787384033203) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 84.705114364624 ms (3.388204574585)
Output for 5.1.6
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.042915344238281 ms (0.0017166137695312) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 83.309888839722 ms (3.3323955535889)
Output for 5.1.5
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 84.471940994263 ms (3.3788776397705)
Output for 5.1.4
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.043153762817383 ms (0.0017261505126953) memoized: 0.043869018554688 ms (0.0017547607421875) recursive: 88.939905166626 ms (3.557596206665)
Output for 5.1.3
iterative: 0.049114227294922 ms (0.0019645690917969) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 86.498022079468 ms (3.4599208831787)
Output for 5.1.2
iterative: 0.087976455688477 ms (0.0035190582275391) binet: 0.072002410888672 ms (0.0028800964355469) memoized: 0.066995620727539 ms (0.0026798248291016) recursive: 113.92998695374 ms (4.5571994781494)
Output for 5.1.1
iterative: 0.056028366088867 ms (0.0022411346435547) binet: 0.04887580871582 ms (0.0019550323486328) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 81.936836242676 ms (3.277473449707)
Output for 5.1.0
iterative: 0.072002410888672 ms (0.0028800964355469) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.033855438232422 ms (0.0013542175292969) recursive: 82.371950149536 ms (3.2948780059814)
Output for 5.0.5
iterative: 0.1218318939209 ms (0.0048732757568359) binet: 0.053167343139648 ms (0.0021266937255859) memoized: 0.04887580871582 ms (0.0019550323486328) recursive: 130.03516197205 ms (5.2014064788818)
Output for 5.0.4
iterative: 0.17285346984863 ms (0.0069141387939453) binet: 0.052928924560547 ms (0.0021171569824219) memoized: 0.046968460083008 ms (0.0018787384033203) recursive: 136.45005226135 ms (5.4580020904541)
Output for 5.0.3
iterative: 0.10490417480469 ms (0.0041961669921875) binet: 0.052928924560547 ms (0.0021171569824219) memoized: 0.047206878662109 ms (0.0018882751464844) recursive: 125.79393386841 ms (5.0317573547363)
Output for 5.0.2
iterative: 0.10895729064941 ms (0.0043582916259766) binet: 0.050067901611328 ms (0.0020027160644531) memoized: 0.065803527832031 ms (0.0026321411132812) recursive: 128.40104103088 ms (5.1360416412354)
Output for 5.0.1
iterative: 0.11897087097168 ms (0.0047588348388672) binet: 0.054836273193359 ms (0.0021934509277344) memoized: 0.050067901611328 ms (0.0020027160644531) recursive: 126.82700157166 ms (5.0730800628662)
Output for 5.0.0
iterative: 0.1220703125 ms (0.0048828125) binet: 0.051021575927734 ms (0.0020408630371094) memoized: 0.051975250244141 ms (0.0020790100097656) recursive: 144.71387863159 ms (5.7885551452637)
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/lGclu on line 22
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/lGclu on line 22
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/lGclu on line 22
Process exited with code 255.