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.029087066650391 ms (0.0011634826660156) binet: 0.047922134399414 ms (0.0019168853759766) memoized: 0.024080276489258 ms (0.00096321105957031) recursive: 29.315948486328 ms (1.1726379394531)
Output for 7.0.14
iterative: 0.02598762512207 ms (0.0010395050048828) binet: 0.046968460083008 ms (0.0018787384033203) memoized: 0.019073486328125 ms (0.000762939453125) recursive: 23.522138595581 ms (0.94088554382324)
Output for 7.0.6
iterative: 0.016927719116211 ms (0.00067710876464844) binet: 0.036954879760742 ms (0.0014781951904297) memoized: 0.012874603271484 ms (0.00051498413085938) recursive: 18.592834472656 ms (0.74371337890625)
Output for 7.0.5
iterative: 0.020980834960938 ms (0.0008392333984375) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.016927719116211 ms (0.00067710876464844) recursive: 21.381139755249 ms (0.85524559020996)
Output for 7.0.4
iterative: 0.024080276489258 ms (0.00096321105957031) binet: 0.044107437133789 ms (0.0017642974853516) memoized: 0.020027160644531 ms (0.00080108642578125) recursive: 20.227909088135 ms (0.80911636352539)
Output for 7.0.3
iterative: 0.01978874206543 ms (0.00079154968261719) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.015974044799805 ms (0.00063896179199219) recursive: 21.503210067749 ms (0.86012840270996)
Output for 7.0.2
iterative: 0.011920928955078 ms (0.00047683715820312) binet: 0.029087066650391 ms (0.0011634826660156) memoized: 0.010967254638672 ms (0.00043869018554688) recursive: 15.079975128174 ms (0.60319900512695)
Output for 7.0.1
iterative: 0.019073486328125 ms (0.000762939453125) binet: 0.040054321289062 ms (0.0016021728515625) memoized: 0.015020370483398 ms (0.00060081481933594) recursive: 20.596027374268 ms (0.8238410949707)
Output for 7.0.0
iterative: 0.019073486328125 ms (0.000762939453125) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.015020370483398 ms (0.00060081481933594) recursive: 19.685029983521 ms (0.78740119934082)
Output for hhvm-3.12.0
iterative: 0.045061111450195 ms (0.0018024444580078) binet: 0.040054321289062 ms (0.0016021728515625) memoized: 0.029087066650391 ms (0.0011634826660156) recursive: 58.016061782837 ms (2.3206424713135)
Output for hhvm-3.10.0
iterative: 0.046968460083008 ms (0.0018787384033203) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 76.287031173706 ms (3.0514812469482)
Output for 5.6.28
iterative: 0.059843063354492 ms (0.0023937225341797) binet: 0.077009201049805 ms (0.0030803680419922) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 81.752061843872 ms (3.2700824737549)
Output for 5.6.21
iterative: 0.041961669921875 ms (0.001678466796875) binet: 0.040054321289062 ms (0.0016021728515625) memoized: 0.02598762512207 ms (0.0010395050048828) recursive: 46.724081039429 ms (1.8689632415771)
Output for 5.6.20
iterative: 0.053882598876953 ms (0.0021553039550781) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 66.768884658813 ms (2.6707553863525)
Output for 5.6.19
iterative: 0.066041946411133 ms (0.0026416778564453) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.045061111450195 ms (0.0018024444580078) recursive: 64.113855361938 ms (2.5645542144775)
Output for 5.6.18
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.037193298339844 ms (0.0014877319335938) recursive: 62.583923339844 ms (2.5033569335938)
Output for 5.6.17
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 60.304880142212 ms (2.4121952056885)
Output for 5.6.16
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.06103515625 ms (0.00244140625) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 64.722061157227 ms (2.5888824462891)
Output for 5.6.15
iterative: 0.059843063354492 ms (0.0023937225341797) binet: 0.068902969360352 ms (0.0027561187744141) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 63.353061676025 ms (2.534122467041)
Output for 5.6.14
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 62.6380443573 ms (2.505521774292)
Output for 5.6.13
iterative: 0.056982040405273 ms (0.0022792816162109) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 61.927080154419 ms (2.4770832061768)
Output for 5.6.12
iterative: 0.059127807617188 ms (0.0023651123046875) binet: 0.059127807617188 ms (0.0023651123046875) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 57.713985443115 ms (2.3085594177246)
Output for 5.6.11
iterative: 0.046014785766602 ms (0.0018405914306641) binet: 0.053882598876953 ms (0.0021553039550781) memoized: 0.033140182495117 ms (0.0013256072998047) recursive: 57.495832443237 ms (2.2998332977295)
Output for 5.6.10
iterative: 0.047206878662109 ms (0.0018882751464844) binet: 0.055074691772461 ms (0.0022029876708984) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 59.785127639771 ms (2.3914051055908)
Output for 5.6.9
iterative: 0.056028366088867 ms (0.0022411346435547) binet: 0.064849853515625 ms (0.002593994140625) memoized: 0.043153762817383 ms (0.0017261505126953) recursive: 83.345890045166 ms (3.3338356018066)
Output for 5.6.8
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 64.433097839355 ms (2.5773239135742)
Output for 5.6.7
iterative: 0.058889389038086 ms (0.0023555755615234) binet: 0.060796737670898 ms (0.0024318695068359) memoized: 0.038862228393555 ms (0.0015544891357422) recursive: 65.287113189697 ms (2.6114845275879)
Output for 5.6.6
iterative: 0.049114227294922 ms (0.0019645690917969) binet: 0.059843063354492 ms (0.0023937225341797) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 61.59496307373 ms (2.4637985229492)
Output for 5.6.5
iterative: 0.046014785766602 ms (0.0018405914306641) binet: 0.054836273193359 ms (0.0021934509277344) memoized: 0.033855438232422 ms (0.0013542175292969) recursive: 56.642055511475 ms (2.265682220459)
Output for 5.6.4
iterative: 0.054121017456055 ms (0.0021648406982422) binet: 0.072002410888672 ms (0.0028800964355469) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 63.698053359985 ms (2.5479221343994)
Output for 5.6.3
iterative: 0.056982040405273 ms (0.0022792816162109) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 59.217214584351 ms (2.368688583374)
Output for 5.6.2
iterative: 0.06103515625 ms (0.00244140625) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 52.49810218811 ms (2.0999240875244)
Output for 5.6.1
iterative: 0.045061111450195 ms (0.0018024444580078) binet: 0.044822692871094 ms (0.0017929077148438) memoized: 0.029087066650391 ms (0.0011634826660156) recursive: 47.241926193237 ms (1.8896770477295)
Output for 5.6.0
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.049829483032227 ms (0.0019931793212891) memoized: 0.030994415283203 ms (0.0012397766113281) recursive: 46.958923339844 ms (1.8783569335938)
Output for 5.5.35
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.040054321289062 ms (0.0016021728515625) recursive: 54.548978805542 ms (2.1819591522217)
Output for 5.5.34
iterative: 0.053167343139648 ms (0.0021266937255859) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.040054321289062 ms (0.0016021728515625) recursive: 62.046051025391 ms (2.4818420410156)
Output for 5.5.33
iterative: 0.049114227294922 ms (0.0019645690917969) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 58.627128601074 ms (2.345085144043)
Output for 5.5.32
iterative: 0.033855438232422 ms (0.0013542175292969) binet: 0.045061111450195 ms (0.0018024444580078) memoized: 0.02598762512207 ms (0.0010395050048828) recursive: 45.536041259766 ms (1.8214416503906)
Output for 5.5.31
iterative: 0.046968460083008 ms (0.0018787384033203) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.034809112548828 ms (0.0013923645019531) recursive: 58.69722366333 ms (2.3478889465332)
Output for 5.5.30
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 64.141035079956 ms (2.5656414031982)
Output for 5.5.29
iterative: 0.04887580871582 ms (0.0019550323486328) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 62.397003173828 ms (2.4958801269531)
Output for 5.5.28
iterative: 0.061988830566406 ms (0.0024795532226562) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.039815902709961 ms (0.0015926361083984) recursive: 60.6529712677 ms (2.426118850708)
Output for 5.5.27
iterative: 0.046014785766602 ms (0.0018405914306641) binet: 0.050067901611328 ms (0.0020027160644531) memoized: 0.033855438232422 ms (0.0013542175292969) recursive: 58.552980422974 ms (2.3421192169189)
Output for 5.5.26
iterative: 0.033855438232422 ms (0.0013542175292969) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.027894973754883 ms (0.0011157989501953) recursive: 46.009063720703 ms (1.8403625488281)
Output for 5.5.25
iterative: 0.043153762817383 ms (0.0017261505126953) binet: 0.047922134399414 ms (0.0019168853759766) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 57.260036468506 ms (2.2904014587402)
Output for 5.5.24
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.058889389038086 ms (0.0023555755615234) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 61.589002609253 ms (2.4635601043701)
Output for 5.5.23
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.058174133300781 ms (0.0023269653320312) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 62.697887420654 ms (2.5079154968262)
Output for 5.5.22
iterative: 0.056028366088867 ms (0.0022411346435547) binet: 0.069856643676758 ms (0.0027942657470703) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 66.910028457642 ms (2.6764011383057)
Output for 5.5.21
iterative: 0.040054321289062 ms (0.0016021728515625) binet: 0.055074691772461 ms (0.0022029876708984) memoized: 0.030994415283203 ms (0.0012397766113281) recursive: 47.315835952759 ms (1.8926334381104)
Output for 5.5.20
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.059843063354492 ms (0.0023937225341797) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 60.302972793579 ms (2.4121189117432)
Output for 5.5.19
iterative: 0.0457763671875 ms (0.0018310546875) binet: 0.053882598876953 ms (0.0021553039550781) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 58.31503868103 ms (2.3326015472412)
Output for 5.5.18
iterative: 0.04887580871582 ms (0.0019550323486328) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 64.869165420532 ms (2.5947666168213)
Output for 5.5.16
iterative: 0.044107437133789 ms (0.0017642974853516) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.030040740966797 ms (0.0012016296386719) recursive: 46.992063522339 ms (1.8796825408936)
Output for 5.5.15
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 60.420989990234 ms (2.4168395996094)
Output for 5.5.14
iterative: 0.045061111450195 ms (0.0018024444580078) binet: 0.04887580871582 ms (0.0019550323486328) memoized: 0.030994415283203 ms (0.0012397766113281) recursive: 44.96693611145 ms (1.798677444458)
Output for 5.5.13
iterative: 0.042915344238281 ms (0.0017166137695312) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.034093856811523 ms (0.0013637542724609) recursive: 48.074960708618 ms (1.9229984283447)
Output for 5.5.12
iterative: 0.032901763916016 ms (0.0013160705566406) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 63.113927841187 ms (2.5245571136475)
Output for 5.5.11
iterative: 0.061988830566406 ms (0.0024795532226562) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 62.189102172852 ms (2.4875640869141)
Output for 5.5.10
iterative: 0.053882598876953 ms (0.0021553039550781) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 64.620971679688 ms (2.5848388671875)
Output for 5.5.9
iterative: 0.063896179199219 ms (0.0025558471679688) binet: 0.077009201049805 ms (0.0030803680419922) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 65.786838531494 ms (2.6314735412598)
Output for 5.5.8
iterative: 0.044107437133789 ms (0.0017642974853516) binet: 0.058174133300781 ms (0.0023269653320312) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 56.669950485229 ms (2.2667980194092)
Output for 5.5.7
iterative: 0.046968460083008 ms (0.0018787384033203) binet: 0.052928924560547 ms (0.0021171569824219) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 58.545112609863 ms (2.3418045043945)
Output for 5.5.6
iterative: 0.032186508178711 ms (0.0012874603271484) binet: 0.039815902709961 ms (0.0015926361083984) memoized: 0.025033950805664 ms (0.0010013580322266) recursive: 45.161962509155 ms (1.8064785003662)
Output for 5.5.5
iterative: 0.046968460083008 ms (0.0018787384033203) binet: 0.059843063354492 ms (0.0023937225341797) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 50.886869430542 ms (2.0354747772217)
Output for 5.5.4
iterative: 0.065088272094727 ms (0.0026035308837891) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 60.899019241333 ms (2.4359607696533)
Output for 5.5.3
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.065803527832031 ms (0.0026321411132812) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 64.53800201416 ms (2.5815200805664)
Output for 5.5.2
iterative: 0.041007995605469 ms (0.0016403198242188) binet: 0.046968460083008 ms (0.0018787384033203) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 64.231157302856 ms (2.5692462921143)
Output for 5.5.1
iterative: 0.033855438232422 ms (0.0013542175292969) binet: 0.051975250244141 ms (0.0020790100097656) memoized: 0.034809112548828 ms (0.0013923645019531) recursive: 54.934978485107 ms (2.1973991394043)
Output for 5.5.0
iterative: 0.053882598876953 ms (0.0021553039550781) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 67.185878753662 ms (2.6874351501465)
Output for 5.4.45
iterative: 0.03504753112793 ms (0.0014019012451172) binet: 0.045061111450195 ms (0.0018024444580078) memoized: 0.030040740966797 ms (0.0012016296386719) recursive: 45.323133468628 ms (1.8129253387451)
Output for 5.4.44
iterative: 0.046968460083008 ms (0.0018787384033203) binet: 0.04887580871582 ms (0.0019550323486328) memoized: 0.044107437133789 ms (0.0017642974853516) recursive: 52.72102355957 ms (2.1088409423828)
Output for 5.4.43
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 59.183835983276 ms (2.3673534393311)
Output for 5.4.42
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.068902969360352 ms (0.0027561187744141) memoized: 0.043153762817383 ms (0.0017261505126953) recursive: 60.932159423828 ms (2.4372863769531)
Output for 5.4.41
iterative: 0.055074691772461 ms (0.0022029876708984) binet: 0.054121017456055 ms (0.0021648406982422) memoized: 0.039815902709961 ms (0.0015926361083984) recursive: 57.806015014648 ms (2.3122406005859)
Output for 5.4.40
iterative: 0.049829483032227 ms (0.0019931793212891) binet: 0.06103515625 ms (0.00244140625) memoized: 0.043153762817383 ms (0.0017261505126953) recursive: 54.710865020752 ms (2.1884346008301)
Output for 5.4.39
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.058174133300781 ms (0.0023269653320312) memoized: 0.040054321289062 ms (0.0016021728515625) recursive: 55.063962936401 ms (2.2025585174561)
Output for 5.4.38
iterative: 0.048160552978516 ms (0.0019264221191406) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 57.969808578491 ms (2.3187923431396)
Output for 5.4.37
iterative: 0.032901763916016 ms (0.0013160705566406) binet: 0.047922134399414 ms (0.0019168853759766) memoized: 0.031948089599609 ms (0.0012779235839844) recursive: 42.389154434204 ms (1.6955661773682)
Output for 5.4.36
iterative: 0.033855438232422 ms (0.0013542175292969) binet: 0.044822692871094 ms (0.0017929077148438) memoized: 0.030040740966797 ms (0.0012016296386719) recursive: 42.498111724854 ms (1.6999244689941)
Output for 5.4.35
iterative: 0.043869018554688 ms (0.0017547607421875) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 46.805143356323 ms (1.8722057342529)
Output for 5.4.34
iterative: 0.077009201049805 ms (0.0030803680419922) binet: 0.067949295043945 ms (0.0027179718017578) memoized: 0.061988830566406 ms (0.0024795532226562) recursive: 52.588939666748 ms (2.1035575866699)
Output for 5.4.32
iterative: 0.055074691772461 ms (0.0022029876708984) binet: 0.071048736572266 ms (0.0028419494628906) memoized: 0.04887580871582 ms (0.0019550323486328) recursive: 64.404964447021 ms (2.5761985778809)
Output for 5.4.31
iterative: 0.063896179199219 ms (0.0025558471679688) binet: 0.073909759521484 ms (0.0029563903808594) memoized: 0.049114227294922 ms (0.0019645690917969) recursive: 57.502031326294 ms (2.3000812530518)
Output for 5.4.30
iterative: 0.044822692871094 ms (0.0017929077148438) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 54.30793762207 ms (2.1723175048828)
Output for 5.4.29
iterative: 0.032186508178711 ms (0.0012874603271484) binet: 0.044107437133789 ms (0.0017642974853516) memoized: 0.026941299438477 ms (0.0010776519775391) recursive: 43.040037155151 ms (1.7216014862061)
Output for 5.4.28
iterative: 0.034093856811523 ms (0.0013637542724609) binet: 0.0457763671875 ms (0.0018310546875) memoized: 0.029087066650391 ms (0.0011634826660156) recursive: 42.281866073608 ms (1.6912746429443)
Output for 5.4.27
iterative: 0.060081481933594 ms (0.0024032592773438) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.043869018554688 ms (0.0017547607421875) recursive: 58.202028274536 ms (2.3280811309814)
Output for 5.4.26
iterative: 0.044822692871094 ms (0.0017929077148438) binet: 0.055074691772461 ms (0.0022029876708984) memoized: 0.038862228393555 ms (0.0015544891357422) recursive: 48.737049102783 ms (1.9494819641113)
Output for 5.4.25
iterative: 0.03504753112793 ms (0.0014019012451172) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.032901763916016 ms (0.0013160705566406) recursive: 54.591178894043 ms (2.1836471557617)
Output for 5.4.24
iterative: 0.036954879760742 ms (0.0014781951904297) binet: 0.043869018554688 ms (0.0017547607421875) memoized: 0.030994415283203 ms (0.0012397766113281) recursive: 46.003818511963 ms (1.8401527404785)
Output for 5.4.23
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.038862228393555 ms (0.0015544891357422) recursive: 57.623147964478 ms (2.3049259185791)
Output for 5.4.22
iterative: 0.037908554077148 ms (0.0015163421630859) binet: 0.054836273193359 ms (0.0021934509277344) memoized: 0.033855438232422 ms (0.0013542175292969) recursive: 46.310186386108 ms (1.8524074554443)
Output for 5.4.21
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.063180923461914 ms (0.0025272369384766) memoized: 0.046014785766602 ms (0.0018405914306641) recursive: 60.610055923462 ms (2.4244022369385)
Output for 5.4.20
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.066995620727539 ms (0.0026798248291016) memoized: 0.046014785766602 ms (0.0018405914306641) recursive: 61.464071273804 ms (2.4585628509521)
Output for 5.4.19
iterative: 0.047206878662109 ms (0.0018882751464844) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 53.765058517456 ms (2.1506023406982)
Output for 5.4.18
iterative: 0.048160552978516 ms (0.0019264221191406) binet: 0.058174133300781 ms (0.0023269653320312) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 57.875871658325 ms (2.315034866333)
Output for 5.4.17
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.042915344238281 ms (0.0017166137695312) memoized: 0.028848648071289 ms (0.0011539459228516) recursive: 43.089151382446 ms (1.7235660552979)
Output for 5.4.16
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 51.850080490112 ms (2.0740032196045)
Output for 5.4.15
iterative: 0.044822692871094 ms (0.0017929077148438) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 51.574945449829 ms (2.0629978179932)
Output for 5.4.14
iterative: 0.048160552978516 ms (0.0019264221191406) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 50.916910171509 ms (2.0366764068604)
Output for 5.4.13
iterative: 0.05793571472168 ms (0.0023174285888672) binet: 0.077009201049805 ms (0.0030803680419922) memoized: 0.044107437133789 ms (0.0017642974853516) recursive: 61.379909515381 ms (2.4551963806152)
Output for 5.4.12
iterative: 0.053167343139648 ms (0.0021266937255859) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.045061111450195 ms (0.0018024444580078) recursive: 64.229965209961 ms (2.5691986083984)
Output for 5.4.11
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.027179718017578 ms (0.0010871887207031) recursive: 42.710781097412 ms (1.7084312438965)
Output for 5.4.10
iterative: 0.058889389038086 ms (0.0023555755615234) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 70.385932922363 ms (2.8154373168945)
Output for 5.4.9
iterative: 0.055074691772461 ms (0.0022029876708984) binet: 0.072956085205078 ms (0.0029182434082031) memoized: 0.047206878662109 ms (0.0018882751464844) recursive: 63.460111618042 ms (2.5384044647217)
Output for 5.4.8
iterative: 0.053167343139648 ms (0.0021266937255859) binet: 0.072002410888672 ms (0.0028800964355469) memoized: 0.045061111450195 ms (0.0018024444580078) recursive: 56.862831115723 ms (2.2745132446289)
Output for 5.4.7
iterative: 0.041007995605469 ms (0.0016403198242188) binet: 0.051975250244141 ms (0.0020790100097656) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 42.861938476562 ms (1.7144775390625)
Output for 5.4.6
iterative: 0.041007995605469 ms (0.0016403198242188) binet: 0.050067901611328 ms (0.0020027160644531) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 47.019958496094 ms (1.8807983398438)
Output for 5.4.5
iterative: 0.042915344238281 ms (0.0017166137695312) binet: 0.055789947509766 ms (0.0022315979003906) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 51.779985427856 ms (2.0711994171143)
Output for 5.4.4
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.045061111450195 ms (0.0018024444580078) recursive: 53.958177566528 ms (2.1583271026611)
Output for 5.4.3
iterative: 0.056028366088867 ms (0.0022411346435547) binet: 0.072002410888672 ms (0.0028800964355469) memoized: 0.04887580871582 ms (0.0019550323486328) recursive: 73.317050933838 ms (2.9326820373535)
Output for 5.4.2
iterative: 0.054836273193359 ms (0.0021934509277344) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.046014785766602 ms (0.0018405914306641) recursive: 60.396909713745 ms (2.4158763885498)
Output for 5.4.1
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.043869018554688 ms (0.0017547607421875) recursive: 58.932065963745 ms (2.3572826385498)
Output for 5.4.0
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.045061111450195 ms (0.0018024444580078) recursive: 57.431936264038 ms (2.2972774505615)
Output for 5.3.29
iterative: 0.076055526733398 ms (0.0030422210693359) binet: 0.070095062255859 ms (0.0028038024902344) memoized: 0.063896179199219 ms (0.0025558471679688) recursive: 87.746858596802 ms (3.5098743438721)
Output for 5.3.28
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.059127807617188 ms (0.0023651123046875) memoized: 0.047206878662109 ms (0.0018882751464844) recursive: 77.272891998291 ms (3.0909156799316)
Output for 5.3.27
iterative: 0.059127807617188 ms (0.0023651123046875) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.055074691772461 ms (0.0022029876708984) recursive: 83.446025848389 ms (3.3378410339355)
Output for 5.3.26
iterative: 0.03814697265625 ms (0.00152587890625) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 65.371990203857 ms (2.6148796081543)
Output for 5.3.25
iterative: 0.076055526733398 ms (0.0030422210693359) binet: 0.068902969360352 ms (0.0027561187744141) memoized: 0.062942504882812 ms (0.0025177001953125) recursive: 83.217859268188 ms (3.3287143707275)
Output for 5.3.24
iterative: 0.058889389038086 ms (0.0023555755615234) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.053882598876953 ms (0.0021553039550781) recursive: 74.244022369385 ms (2.9697608947754)
Output for 5.3.23
iterative: 0.062942504882812 ms (0.0025177001953125) binet: 0.071048736572266 ms (0.0028419494628906) memoized: 0.06103515625 ms (0.00244140625) recursive: 92.496871948242 ms (3.6998748779297)
Output for 5.3.22
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.0457763671875 ms (0.0018310546875) recursive: 78.383922576904 ms (3.1353569030762)
Output for 5.3.21
iterative: 0.03814697265625 ms (0.00152587890625) binet: 0.043869018554688 ms (0.0017547607421875) memoized: 0.033855438232422 ms (0.0013542175292969) recursive: 67.260980606079 ms (2.6904392242432)
Output for 5.3.20
iterative: 0.055789947509766 ms (0.0022315979003906) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.051021575927734 ms (0.0020408630371094) recursive: 79.567193984985 ms (3.1826877593994)
Output for 5.3.19
iterative: 0.056028366088867 ms (0.0022411346435547) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.052928924560547 ms (0.0021171569824219) recursive: 84.995031356812 ms (3.3998012542725)
Output for 5.3.18
iterative: 0.065088272094727 ms (0.0026035308837891) binet: 0.076055526733398 ms (0.0030422210693359) memoized: 0.058889389038086 ms (0.0023555755615234) recursive: 84.861993789673 ms (3.3944797515869)
Output for 5.3.17
iterative: 0.060081481933594 ms (0.0024032592773438) binet: 0.068902969360352 ms (0.0027561187744141) memoized: 0.054836273193359 ms (0.0021934509277344) recursive: 82.026958465576 ms (3.281078338623)
Output for 5.3.16
iterative: 0.061988830566406 ms (0.0024795532226562) binet: 0.069856643676758 ms (0.0027942657470703) memoized: 0.056028366088867 ms (0.0022411346435547) recursive: 89.624881744385 ms (3.5849952697754)
Output for 5.3.15
iterative: 0.038862228393555 ms (0.0015544891357422) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 64.96000289917 ms (2.5984001159668)
Output for 5.3.14
iterative: 0.071048736572266 ms (0.0028419494628906) binet: 0.081062316894531 ms (0.0032424926757812) memoized: 0.063180923461914 ms (0.0025272369384766) recursive: 90.337991714478 ms (3.6135196685791)
Output for 5.3.13
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.048160552978516 ms (0.0019264221191406) recursive: 81.499814987183 ms (3.2599925994873)
Output for 5.3.12
iterative: 0.036954879760742 ms (0.0014781951904297) binet: 0.051021575927734 ms (0.0020408630371094) memoized: 0.046014785766602 ms (0.0018405914306641) recursive: 66.296815872192 ms (2.6518726348877)
Output for 5.3.11
iterative: 0.039100646972656 ms (0.0015640258789062) binet: 0.046968460083008 ms (0.0018787384033203) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 93.173027038574 ms (3.726921081543)
Output for 5.3.10
iterative: 0.06103515625 ms (0.00244140625) binet: 0.069141387939453 ms (0.0027656555175781) memoized: 0.056982040405273 ms (0.0022792816162109) recursive: 89.892864227295 ms (3.5957145690918)
Output for 5.3.9
iterative: 0.046014785766602 ms (0.0018405914306641) binet: 0.053167343139648 ms (0.0021266937255859) memoized: 0.044107437133789 ms (0.0017642974853516) recursive: 69.280862808228 ms (2.7712345123291)
Output for 5.3.8
iterative: 0.039100646972656 ms (0.0015640258789062) binet: 0.046014785766602 ms (0.0018405914306641) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 64.571142196655 ms (2.5828456878662)
Output for 5.3.7
iterative: 0.037908554077148 ms (0.0015163421630859) binet: 0.042915344238281 ms (0.0017166137695312) memoized: 0.034809112548828 ms (0.0013923645019531) recursive: 64.96000289917 ms (2.5984001159668)
Output for 5.3.6
iterative: 0.062942504882812 ms (0.0025177001953125) binet: 0.068902969360352 ms (0.0027561187744141) memoized: 0.066995620727539 ms (0.0026798248291016) recursive: 79.166889190674 ms (3.166675567627)
Output for 5.3.5
iterative: 0.056982040405273 ms (0.0022792816162109) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.051975250244141 ms (0.0020790100097656) recursive: 75.182914733887 ms (3.0073165893555)
Output for 5.3.4
iterative: 0.065088272094727 ms (0.0026035308837891) binet: 0.070810317993164 ms (0.0028324127197266) memoized: 0.056028366088867 ms (0.0022411346435547) recursive: 90.896129608154 ms (3.6358451843262)
Output for 5.3.3
iterative: 0.06103515625 ms (0.00244140625) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.056982040405273 ms (0.0022792816162109) recursive: 90.670108795166 ms (3.6268043518066)
Output for 5.3.2
iterative: 0.044107437133789 ms (0.0017642974853516) binet: 0.049114227294922 ms (0.0019645690917969) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 68.458080291748 ms (2.7383232116699)
Output for 5.3.1
iterative: 0.049114227294922 ms (0.0019645690917969) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.046968460083008 ms (0.0018787384033203) recursive: 78.901052474976 ms (3.156042098999)
Output for 5.3.0
iterative: 0.065803527832031 ms (0.0026321411132812) binet: 0.1070499420166 ms (0.0042819976806641) memoized: 0.066995620727539 ms (0.0026798248291016) recursive: 89.881896972656 ms (3.5952758789062)
Output for 5.2.17
iterative: 0.08392333984375 ms (0.00335693359375) binet: 0.072956085205078 ms (0.0029182434082031) memoized: 0.062942504882812 ms (0.0025177001953125) recursive: 113.28101158142 ms (4.5312404632568)
Output for 5.2.16
iterative: 0.056028366088867 ms (0.0022411346435547) binet: 0.051975250244141 ms (0.0020790100097656) memoized: 0.044822692871094 ms (0.0017929077148438) recursive: 90.662956237793 ms (3.6265182495117)
Output for 5.2.15
iterative: 0.075101852416992 ms (0.0030040740966797) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.072002410888672 ms (0.0028800964355469) recursive: 113.13796043396 ms (4.5255184173584)
Output for 5.2.14
iterative: 0.088930130004883 ms (0.0035572052001953) binet: 0.070810317993164 ms (0.0028324127197266) memoized: 0.068902969360352 ms (0.0027561187744141) recursive: 117.92898178101 ms (4.7171592712402)
Output for 5.2.13
iterative: 0.075101852416992 ms (0.0030040740966797) binet: 0.069141387939453 ms (0.0027656555175781) memoized: 0.059127807617188 ms (0.0023651123046875) recursive: 105.87811470032 ms (4.2351245880127)
Output for 5.2.12
iterative: 0.097036361694336 ms (0.0038814544677734) binet: 0.085830688476562 ms (0.0034332275390625) memoized: 0.075101852416992 ms (0.0030040740966797) recursive: 124.27282333374 ms (4.9709129333496)
Output for 5.2.11
iterative: 0.10514259338379 ms (0.0042057037353516) binet: 0.082969665527344 ms (0.0033187866210938) memoized: 0.077009201049805 ms (0.0030803680419922) recursive: 118.38793754578 ms (4.7355175018311)
Output for 5.2.10
iterative: 0.089883804321289 ms (0.0035953521728516) binet: 0.077009201049805 ms (0.0030803680419922) memoized: 0.069141387939453 ms (0.0027656555175781) recursive: 121.48308753967 ms (4.8593235015869)
Output for 5.2.9
iterative: 0.05793571472168 ms (0.0023174285888672) binet: 0.052928924560547 ms (0.0021171569824219) memoized: 0.043153762817383 ms (0.0017261505126953) recursive: 97.756862640381 ms (3.9102745056152)
Output for 5.2.8
iterative: 0.085830688476562 ms (0.0034332275390625) binet: 0.074148178100586 ms (0.0029659271240234) memoized: 0.066995620727539 ms (0.0026798248291016) recursive: 114.97402191162 ms (4.5989608764648)
Output for 5.2.7
iterative: 0.092983245849609 ms (0.0037193298339844) binet: 0.086069107055664 ms (0.0034427642822266) memoized: 0.072956085205078 ms (0.0029182434082031) recursive: 112.71190643311 ms (4.5084762573242)
Output for 5.2.6
iterative: 0.092029571533203 ms (0.0036811828613281) binet: 0.075101852416992 ms (0.0030040740966797) memoized: 0.071048736572266 ms (0.0028419494628906) recursive: 110.42499542236 ms (4.4169998168945)
Output for 5.2.5
iterative: 0.068187713623047 ms (0.0027275085449219) binet: 0.06103515625 ms (0.00244140625) memoized: 0.050067901611328 ms (0.0020027160644531) recursive: 88.742017745972 ms (3.5496807098389)
Output for 5.2.4
iterative: 0.090122222900391 ms (0.0036048889160156) binet: 0.081062316894531 ms (0.0032424926757812) memoized: 0.072002410888672 ms (0.0028800964355469) recursive: 110.61096191406 ms (4.4244384765625)
Output for 5.2.3
iterative: 0.10895729064941 ms (0.0043582916259766) binet: 0.08702278137207 ms (0.0034809112548828) memoized: 0.079870223999023 ms (0.0031948089599609) recursive: 118.6740398407 ms (4.7469615936279)
Output for 5.2.2
iterative: 0.09608268737793 ms (0.0038433074951172) binet: 0.084877014160156 ms (0.0033950805664062) memoized: 0.075101852416992 ms (0.0030040740966797) recursive: 116.71900749207 ms (4.6687602996826)
Output for 5.2.1
iterative: 0.087976455688477 ms (0.0035190582275391) binet: 0.076055526733398 ms (0.0030422210693359) memoized: 0.064849853515625 ms (0.002593994140625) recursive: 104.58397865295 ms (4.1833591461182)
Output for 5.2.0
iterative: 0.092029571533203 ms (0.0036811828613281) binet: 0.082015991210938 ms (0.0032806396484375) memoized: 0.069856643676758 ms (0.0027942657470703) recursive: 110.00108718872 ms (4.4000434875488)
Output for 5.1.6
iterative: 0.094890594482422 ms (0.0037956237792969) binet: 0.078916549682617 ms (0.0031566619873047) memoized: 0.076055526733398 ms (0.0030422210693359) recursive: 118.74508857727 ms (4.7498035430908)
Output for 5.1.5
iterative: 0.092029571533203 ms (0.0036811828613281) binet: 0.073909759521484 ms (0.0029563903808594) memoized: 0.069856643676758 ms (0.0027942657470703) recursive: 108.86788368225 ms (4.35471534729)
Output for 5.1.4
iterative: 0.10395050048828 ms (0.0041580200195312) binet: 0.077962875366211 ms (0.0031185150146484) memoized: 0.077009201049805 ms (0.0030803680419922) recursive: 121.46782875061 ms (4.8587131500244)
Output for 5.1.3
iterative: 0.10180473327637 ms (0.0040721893310547) binet: 0.086069107055664 ms (0.0034427642822266) memoized: 0.080108642578125 ms (0.003204345703125) recursive: 120.24116516113 ms (4.8096466064453)
Output for 5.1.2
iterative: 0.10299682617188 ms (0.004119873046875) binet: 0.081062316894531 ms (0.0032424926757812) memoized: 0.072956085205078 ms (0.0029182434082031) recursive: 116.07599258423 ms (4.6430397033691)
Output for 5.1.1
iterative: 0.084877014160156 ms (0.0033950805664062) binet: 0.089883804321289 ms (0.0035953521728516) memoized: 0.065088272094727 ms (0.0026035308837891) recursive: 104.95400428772 ms (4.1981601715088)
Output for 5.1.0
iterative: 0.078916549682617 ms (0.0031566619873047) binet: 0.054836273193359 ms (0.0021934509277344) memoized: 0.046014785766602 ms (0.0018405914306641) recursive: 86.874961853027 ms (3.4749984741211)
Output for 5.0.5
iterative: 0.24294853210449 ms (0.0097179412841797) binet: 0.10585784912109 ms (0.0042343139648438) memoized: 0.098943710327148 ms (0.0039577484130859) recursive: 177.18887329102 ms (7.0875549316406)
Output for 5.0.4
iterative: 0.24700164794922 ms (0.0098800659179688) binet: 0.1070499420166 ms (0.0042819976806641) memoized: 0.10204315185547 ms (0.0040817260742188) recursive: 167.9630279541 ms (6.7185211181641)
Output for 5.0.3
iterative: 0.14400482177734 ms (0.0057601928710938) binet: 0.069856643676758 ms (0.0027942657470703) memoized: 0.063896179199219 ms (0.0025558471679688) recursive: 138.54789733887 ms (5.5419158935547)
Output for 5.0.2
iterative: 0.1838207244873 ms (0.0073528289794922) binet: 0.082015991210938 ms (0.0032806396484375) memoized: 0.077962875366211 ms (0.0031185150146484) recursive: 134.0639591217 ms (5.3625583648682)
Output for 5.0.1
iterative: 0.25010108947754 ms (0.010004043579102) binet: 0.10395050048828 ms (0.0041580200195312) memoized: 0.10299682617188 ms (0.004119873046875) recursive: 162.3899936676 ms (6.4955997467041)
Output for 5.0.0
iterative: 0.2140998840332 ms (0.0085639953613281) binet: 0.09918212890625 ms (0.00396728515625) memoized: 0.10585784912109 ms (0.0042343139648438) recursive: 175.6157875061 ms (7.0246315002441)
Output for 4.4.2 - 4.4.9
<br /> <b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/in/5ksoN</b> on line <b>12</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
<br /> <b>Parse error</b>: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/in/5ksoN</b> on line <b>12</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in <b>/in/5ksoN</b> on line <b>12</b><br />
Process exited with code 255.