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.016927719116211 ms (0.00067710876464844) binet: 0.045061111450195 ms (0.0018024444580078) memoized: 0.015020370483398 ms (0.00060081481933594) recursive: 18.075942993164 ms (0.72303771972656)
Output for 7.0.14
iterative: 0.025033950805664 ms (0.0010013580322266) binet: 0.036001205444336 ms (0.0014400482177734) memoized: 0.016927719116211 ms (0.00067710876464844) recursive: 21.361112594604 ms (0.85444450378418)
Output for 7.0.7
iterative: 0.016927719116211 ms (0.00067710876464844) binet: 0.037908554077148 ms (0.0015163421630859) memoized: 0.013113021850586 ms (0.00052452087402344) recursive: 19.012928009033 ms (0.76051712036133)
Output for 7.0.6
iterative: 0.015020370483398 ms (0.00060081481933594) binet: 0.03504753112793 ms (0.0014019012451172) memoized: 0.011920928955078 ms (0.00047683715820312) recursive: 17.202138900757 ms (0.68808555603027)
Output for 7.0.5
iterative: 0.018119812011719 ms (0.00072479248046875) binet: 0.040054321289062 ms (0.0016021728515625) memoized: 0.015020370483398 ms (0.00060081481933594) recursive: 20.492076873779 ms (0.81968307495117)
Output for 7.0.4
iterative: 0.017881393432617 ms (0.00071525573730469) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.014781951904297 ms (0.00059127807617188) recursive: 19.760847091675 ms (0.79043388366699)
Output for 7.0.3
iterative: 0.015974044799805 ms (0.00063896179199219) binet: 0.036001205444336 ms (0.0014400482177734) memoized: 0.014066696166992 ms (0.00056266784667969) recursive: 18.194913864136 ms (0.72779655456543)
Output for 7.0.2
iterative: 0.014066696166992 ms (0.00056266784667969) binet: 0.036954879760742 ms (0.0014781951904297) memoized: 0.011920928955078 ms (0.00047683715820312) recursive: 15.511035919189 ms (0.62044143676758)
Output for 7.0.1
iterative: 0.018119812011719 ms (0.00072479248046875) binet: 0.037908554077148 ms (0.0015163421630859) memoized: 0.015020370483398 ms (0.00060081481933594) recursive: 20.362854003906 ms (0.81451416015625)
Output for 7.0.0
iterative: 0.019073486328125 ms (0.000762939453125) binet: 0.043153762817383 ms (0.0017261505126953) memoized: 0.015020370483398 ms (0.00060081481933594) recursive: 20.961046218872 ms (0.83844184875488)
Output for 5.6.28
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.043153762817383 ms (0.0017261505126953) recursive: 6.2811374664307 ms (0.25124549865723)
Output for 5.6.22
iterative: 0.048160552978516 ms (0.0019264221191406) binet: 0.055074691772461 ms (0.0022029876708984) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 60.808897018433 ms (2.4323558807373)
Output for 5.6.21
iterative: 0.060081481933594 ms (0.0024032592773438) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 62.356948852539 ms (2.4942779541016)
Output for 5.6.20
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.038862228393555 ms (0.0015544891357422) recursive: 64.957857131958 ms (2.5983142852783)
Output for 5.6.19
iterative: 0.060081481933594 ms (0.0024032592773438) binet: 0.077009201049805 ms (0.0030803680419922) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 68.240165710449 ms (2.729606628418)
Output for 5.6.18
iterative: 0.045061111450195 ms (0.0018024444580078) binet: 0.055074691772461 ms (0.0022029876708984) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 58.604955673218 ms (2.3441982269287)
Output for 5.6.17
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.06103515625 ms (0.00244140625) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 65.352916717529 ms (2.6141166687012)
Output for 5.6.16
iterative: 0.066041946411133 ms (0.0026416778564453) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.044107437133789 ms (0.0017642974853516) recursive: 62.371969223022 ms (2.4948787689209)
Output for 5.6.15
iterative: 0.045061111450195 ms (0.0018024444580078) binet: 0.051021575927734 ms (0.0020408630371094) memoized: 0.034093856811523 ms (0.0013637542724609) recursive: 55.131912231445 ms (2.2052764892578)
Output for 5.6.14
iterative: 0.070810317993164 ms (0.0028324127197266) binet: 0.06103515625 ms (0.00244140625) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 64.441919326782 ms (2.5776767730713)
Output for 5.6.13
iterative: 0.053882598876953 ms (0.0021553039550781) binet: 0.068902969360352 ms (0.0027561187744141) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 58.76898765564 ms (2.3507595062256)
Output for 5.6.12
iterative: 0.058174133300781 ms (0.0023269653320312) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.034093856811523 ms (0.0013637542724609) recursive: 61.750888824463 ms (2.4700355529785)
Output for 5.6.11
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.058889389038086 ms (0.0023555755615234) memoized: 0.038862228393555 ms (0.0015544891357422) recursive: 60.719013214111 ms (2.4287605285645)
Output for 5.6.10
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.039815902709961 ms (0.0015926361083984) recursive: 64.396142959595 ms (2.5758457183838)
Output for 5.6.9
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 62.2398853302 ms (2.489595413208)
Output for 5.6.8
iterative: 0.066995620727539 ms (0.0026798248291016) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.045061111450195 ms (0.0018024444580078) recursive: 64.661026000977 ms (2.5864410400391)
Output for 5.6.7
iterative: 0.067949295043945 ms (0.0027179718017578) binet: 0.071048736572266 ms (0.0028419494628906) memoized: 0.055074691772461 ms (0.0022029876708984) recursive: 67.945957183838 ms (2.7178382873535)
Output for 5.6.6
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.038862228393555 ms (0.0015544891357422) recursive: 66.898107528687 ms (2.6759243011475)
Output for 5.6.5
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.028848648071289 ms (0.0011539459228516) recursive: 46.62013053894 ms (1.8648052215576)
Output for 5.6.4
iterative: 0.033140182495117 ms (0.0013256072998047) binet: 0.040054321289062 ms (0.0016021728515625) memoized: 0.024080276489258 ms (0.00096321105957031) recursive: 45.734882354736 ms (1.8293952941895)
Output for 5.6.3
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.036954879760742 ms (0.0014781951904297) memoized: 0.024080276489258 ms (0.00096321105957031) recursive: 45.08113861084 ms (1.8032455444336)
Output for 5.6.2
iterative: 0.045061111450195 ms (0.0018024444580078) binet: 0.043153762817383 ms (0.0017261505126953) memoized: 0.027894973754883 ms (0.0011157989501953) recursive: 46.187877655029 ms (1.8475151062012)
Output for 5.6.1
iterative: 0.041007995605469 ms (0.0016403198242188) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.026226043701172 ms (0.0010490417480469) recursive: 46.189069747925 ms (1.847562789917)
Output for 5.6.0
iterative: 0.027179718017578 ms (0.0010871887207031) binet: 0.033140182495117 ms (0.0013256072998047) memoized: 0.020027160644531 ms (0.00080108642578125) recursive: 37.973880767822 ms (1.5189552307129)
Output for 5.5.36
iterative: 0.045061111450195 ms (0.0018024444580078) binet: 0.059127807617188 ms (0.0023651123046875) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 57.827949523926 ms (2.313117980957)
Output for 5.5.35
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 62.033176422119 ms (2.4813270568848)
Output for 5.5.34
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 58.424949645996 ms (2.3369979858398)
Output for 5.5.33
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.059843063354492 ms (0.0023937225341797) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 64.264059066772 ms (2.5705623626709)
Output for 5.5.32
iterative: 0.060796737670898 ms (0.0024318695068359) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.041007995605469 ms (0.0016403198242188) recursive: 56.935787200928 ms (2.2774314880371)
Output for 5.5.31
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.068187713623047 ms (0.0027275085449219) memoized: 0.040054321289062 ms (0.0016021728515625) recursive: 63.502073287964 ms (2.5400829315186)
Output for 5.5.30
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.091075897216797 ms (0.0036430358886719) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 56.097030639648 ms (2.2438812255859)
Output for 5.5.29
iterative: 0.068902969360352 ms (0.0027561187744141) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.046014785766602 ms (0.0018405914306641) recursive: 64.594984054565 ms (2.5837993621826)
Output for 5.5.28
iterative: 0.079154968261719 ms (0.0031661987304688) binet: 0.072002410888672 ms (0.0028800964355469) memoized: 0.043869018554688 ms (0.0017547607421875) recursive: 54.475069046021 ms (2.1790027618408)
Output for 5.5.27
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.061988830566406 ms (0.0024795532226562) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 56.252002716064 ms (2.2500801086426)
Output for 5.5.26
iterative: 0.071048736572266 ms (0.0028419494628906) binet: 0.072002410888672 ms (0.0028800964355469) memoized: 0.049114227294922 ms (0.0019645690917969) recursive: 56.252002716064 ms (2.2500801086426)
Output for 5.5.25
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 54.527044296265 ms (2.1810817718506)
Output for 5.5.24
iterative: 0.042915344238281 ms (0.0017166137695312) binet: 0.046968460083008 ms (0.0018787384033203) memoized: 0.029087066650391 ms (0.0011634826660156) recursive: 44.785022735596 ms (1.7914009094238)
Output for 5.5.23
iterative: 0.034093856811523 ms (0.0013637542724609) binet: 0.044822692871094 ms (0.0017929077148438) memoized: 0.027894973754883 ms (0.0011157989501953) recursive: 45.839071273804 ms (1.8335628509521)
Output for 5.5.22
iterative: 0.056028366088867 ms (0.0022411346435547) binet: 0.06103515625 ms (0.00244140625) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 60.792922973633 ms (2.4317169189453)
Output for 5.5.21
iterative: 0.052928924560547 ms (0.0021171569824219) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 63.283920288086 ms (2.5313568115234)
Output for 5.5.20
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.037908554077148 ms (0.0015163421630859) memoized: 0.025033950805664 ms (0.0010013580322266) recursive: 46.378135681152 ms (1.8551254272461)
Output for 5.5.19
iterative: 0.036001205444336 ms (0.0014400482177734) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.025033950805664 ms (0.0010013580322266) recursive: 46.458005905151 ms (1.8583202362061)
Output for 5.5.18
iterative: 0.033140182495117 ms (0.0013256072998047) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.024795532226562 ms (0.0009918212890625) recursive: 42.784214019775 ms (1.711368560791)
Output for 5.5.16
iterative: 0.041007995605469 ms (0.0016403198242188) binet: 0.050067901611328 ms (0.0020027160644531) memoized: 0.032901763916016 ms (0.0013160705566406) recursive: 60.232877731323 ms (2.4093151092529)
Output for 5.5.15
iterative: 0.048160552978516 ms (0.0019264221191406) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 81.37583732605 ms (3.255033493042)
Output for 5.5.14
iterative: 0.037908554077148 ms (0.0015163421630859) binet: 0.03814697265625 ms (0.00152587890625) memoized: 0.026941299438477 ms (0.0010776519775391) recursive: 44.770002365112 ms (1.7908000946045)
Output for 5.5.13
iterative: 0.034093856811523 ms (0.0013637542724609) binet: 0.034809112548828 ms (0.0013923645019531) memoized: 0.023126602172852 ms (0.00092506408691406) recursive: 37.993192672729 ms (1.5197277069092)
Output for 5.5.12
iterative: 0.026226043701172 ms (0.0010490417480469) binet: 0.03504753112793 ms (0.0014019012451172) memoized: 0.022172927856445 ms (0.00088691711425781) recursive: 44.044971466064 ms (1.7617988586426)
Output for 5.5.11
iterative: 0.03504753112793 ms (0.0014019012451172) binet: 0.036001205444336 ms (0.0014400482177734) memoized: 0.023126602172852 ms (0.00092506408691406) recursive: 37.041902542114 ms (1.4816761016846)
Output for 5.5.10
iterative: 0.026941299438477 ms (0.0010776519775391) binet: 0.03504753112793 ms (0.0014019012451172) memoized: 0.020980834960938 ms (0.0008392333984375) recursive: 39.870977401733 ms (1.5948390960693)
Output for 5.5.9
iterative: 0.041961669921875 ms (0.001678466796875) binet: 0.046968460083008 ms (0.0018787384033203) memoized: 0.031948089599609 ms (0.0012779235839844) recursive: 59.698820114136 ms (2.3879528045654)
Output for 5.5.8
iterative: 0.041961669921875 ms (0.001678466796875) binet: 0.051021575927734 ms (0.0020408630371094) memoized: 0.032901763916016 ms (0.0013160705566406) recursive: 66.81489944458 ms (2.6725959777832)
Output for 5.5.7
iterative: 0.026941299438477 ms (0.0010776519775391) binet: 0.034809112548828 ms (0.0013923645019531) memoized: 0.020980834960938 ms (0.0008392333984375) recursive: 37.477970123291 ms (1.4991188049316)
Output for 5.5.6
iterative: 0.037193298339844 ms (0.0014877319335938) binet: 0.039815902709961 ms (0.0015926361083984) memoized: 0.025033950805664 ms (0.0010013580322266) recursive: 44.385194778442 ms (1.7754077911377)
Output for 5.5.5
iterative: 0.034093856811523 ms (0.0013637542724609) binet: 0.043153762817383 ms (0.0017261505126953) memoized: 0.02598762512207 ms (0.0010395050048828) recursive: 45.833110809326 ms (1.833324432373)
Output for 5.5.4
iterative: 0.027894973754883 ms (0.0011157989501953) binet: 0.036001205444336 ms (0.0014400482177734) memoized: 0.020980834960938 ms (0.0008392333984375) recursive: 38.445949554443 ms (1.5378379821777)
Output for 5.5.3
iterative: 0.028133392333984 ms (0.0011253356933594) binet: 0.03504753112793 ms (0.0014019012451172) memoized: 0.021934509277344 ms (0.00087738037109375) recursive: 37.557125091553 ms (1.5022850036621)
Output for 5.5.2
iterative: 0.027179718017578 ms (0.0010871887207031) binet: 0.033140182495117 ms (0.0013256072998047) memoized: 0.020980834960938 ms (0.0008392333984375) recursive: 37.554979324341 ms (1.5021991729736)
Output for 5.5.1
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 73.785066604614 ms (2.9514026641846)
Output for 5.5.0
iterative: 0.033855438232422 ms (0.0013542175292969) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.02598762512207 ms (0.0010395050048828) recursive: 47.502994537354 ms (1.9001197814941)
Output for 5.4.45
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.064849853515625 ms (0.002593994140625) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 61.241865158081 ms (2.4496746063232)
Output for 5.4.44
iterative: 0.10395050048828 ms (0.0041580200195312) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.048160552978516 ms (0.0019264221191406) recursive: 56.437969207764 ms (2.2575187683105)
Output for 5.4.43
iterative: 0.078201293945312 ms (0.0031280517578125) binet: 0.059127807617188 ms (0.0023651123046875) memoized: 0.068902969360352 ms (0.0027561187744141) recursive: 60.564994812012 ms (2.4225997924805)
Output for 5.4.42
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.041961669921875 ms (0.001678466796875) recursive: 61.631917953491 ms (2.4652767181396)
Output for 5.4.41
iterative: 0.046968460083008 ms (0.0018787384033203) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.038862228393555 ms (0.0015544891357422) recursive: 51.119089126587 ms (2.0447635650635)
Output for 5.4.40
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.051021575927734 ms (0.0020408630371094) memoized: 0.037908554077148 ms (0.0015163421630859) recursive: 49.010992050171 ms (1.9604396820068)
Output for 5.4.39
iterative: 0.061988830566406 ms (0.0024795532226562) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 59.959888458252 ms (2.3983955383301)
Output for 5.4.38
iterative: 0.061988830566406 ms (0.0024795532226562) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.046968460083008 ms (0.0018787384033203) recursive: 53.102016448975 ms (2.124080657959)
Output for 5.4.37
iterative: 0.034809112548828 ms (0.0013923645019531) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.029087066650391 ms (0.0011634826660156) recursive: 43.942928314209 ms (1.7577171325684)
Output for 5.4.36
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.040054321289062 ms (0.0016021728515625) memoized: 0.028133392333984 ms (0.0011253356933594) recursive: 41.959047317505 ms (1.6783618927002)
Output for 5.4.35
iterative: 0.032186508178711 ms (0.0012874603271484) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.02598762512207 ms (0.0010395050048828) recursive: 51.671028137207 ms (2.0668411254883)
Output for 5.4.34
iterative: 0.02598762512207 ms (0.0010395050048828) binet: 0.036001205444336 ms (0.0014400482177734) memoized: 0.021934509277344 ms (0.00087738037109375) recursive: 35.624027252197 ms (1.4249610900879)
Output for 5.4.32
iterative: 0.02598762512207 ms (0.0010395050048828) binet: 0.032901763916016 ms (0.0013160705566406) memoized: 0.021934509277344 ms (0.00087738037109375) recursive: 34.918069839478 ms (1.3967227935791)
Output for 5.4.31
iterative: 0.02598762512207 ms (0.0010395050048828) binet: 0.033855438232422 ms (0.0013542175292969) memoized: 0.020980834960938 ms (0.0008392333984375) recursive: 36.044120788574 ms (1.441764831543)
Output for 5.4.30
iterative: 0.02598762512207 ms (0.0010395050048828) binet: 0.03504753112793 ms (0.0014019012451172) memoized: 0.022172927856445 ms (0.00088691711425781) recursive: 35.330057144165 ms (1.4132022857666)
Output for 5.4.29
iterative: 0.031948089599609 ms (0.0012779235839844) binet: 0.031948089599609 ms (0.0012779235839844) memoized: 0.025033950805664 ms (0.0010013580322266) recursive: 37.580013275146 ms (1.5032005310059)
Output for 5.4.28
iterative: 0.02598762512207 ms (0.0010395050048828) binet: 0.03504753112793 ms (0.0014019012451172) memoized: 0.022172927856445 ms (0.00088691711425781) recursive: 34.435033798218 ms (1.3774013519287)
Output for 5.4.27
iterative: 0.049829483032227 ms (0.0019931793212891) binet: 0.055074691772461 ms (0.0022029876708984) memoized: 0.040054321289062 ms (0.0016021728515625) recursive: 62.345027923584 ms (2.4938011169434)
Output for 5.4.26
iterative: 0.030040740966797 ms (0.0012016296386719) binet: 0.037193298339844 ms (0.0014877319335938) memoized: 0.025033950805664 ms (0.0010013580322266) recursive: 37.028074264526 ms (1.4811229705811)
Output for 5.4.25
iterative: 0.026941299438477 ms (0.0010776519775391) binet: 0.034093856811523 ms (0.0013637542724609) memoized: 0.023126602172852 ms (0.00092506408691406) recursive: 34.855127334595 ms (1.3942050933838)
Output for 5.4.24
iterative: 0.033855438232422 ms (0.0013542175292969) binet: 0.041007995605469 ms (0.0016403198242188) memoized: 0.02598762512207 ms (0.0010395050048828) recursive: 42.062997817993 ms (1.6825199127197)
Output for 5.4.23
iterative: 0.026941299438477 ms (0.0010776519775391) binet: 0.037193298339844 ms (0.0014877319335938) memoized: 0.023126602172852 ms (0.00092506408691406) recursive: 35.145044326782 ms (1.4058017730713)
Output for 5.4.22
iterative: 0.026941299438477 ms (0.0010776519775391) binet: 0.032186508178711 ms (0.0012874603271484) memoized: 0.021934509277344 ms (0.00087738037109375) recursive: 36.132097244263 ms (1.4452838897705)
Output for 5.4.21
iterative: 0.026941299438477 ms (0.0010776519775391) binet: 0.034093856811523 ms (0.0013637542724609) memoized: 0.022172927856445 ms (0.00088691711425781) recursive: 34.610033035278 ms (1.3844013214111)
Output for 5.4.20
iterative: 0.026941299438477 ms (0.0010776519775391) binet: 0.040054321289062 ms (0.0016021728515625) memoized: 0.023126602172852 ms (0.00092506408691406) recursive: 37.15705871582 ms (1.4862823486328)
Output for 5.4.19
iterative: 0.026941299438477 ms (0.0010776519775391) binet: 0.036001205444336 ms (0.0014400482177734) memoized: 0.022172927856445 ms (0.00088691711425781) recursive: 36.303043365479 ms (1.4521217346191)
Output for 5.4.18
iterative: 0.036001205444336 ms (0.0014400482177734) binet: 0.03504753112793 ms (0.0014019012451172) memoized: 0.027179718017578 ms (0.0010871887207031) recursive: 55.755138397217 ms (2.2302055358887)
Output for 5.4.17
iterative: 0.030040740966797 ms (0.0012016296386719) binet: 0.037908554077148 ms (0.0015163421630859) memoized: 0.023841857910156 ms (0.00095367431640625) recursive: 39.911031723022 ms (1.5964412689209)
Output for 5.4.16
iterative: 0.027894973754883 ms (0.0011157989501953) binet: 0.036001205444336 ms (0.0014400482177734) memoized: 0.023126602172852 ms (0.00092506408691406) recursive: 35.140991210938 ms (1.4056396484375)
Output for 5.4.15
iterative: 0.033140182495117 ms (0.0013256072998047) binet: 0.037908554077148 ms (0.0015163421630859) memoized: 0.02598762512207 ms (0.0010395050048828) recursive: 43.894052505493 ms (1.7557621002197)
Output for 5.4.14
iterative: 0.045061111450195 ms (0.0018024444580078) binet: 0.056982040405273 ms (0.0022792816162109) memoized: 0.036954879760742 ms (0.0014781951904297) recursive: 57.342052459717 ms (2.2936820983887)
Output for 5.4.13
iterative: 0.05793571472168 ms (0.0023174285888672) binet: 0.089883804321289 ms (0.0035953521728516) memoized: 0.069856643676758 ms (0.0027942657470703) recursive: 62.560081481934 ms (2.5024032592773)
Output for 5.4.12
iterative: 0.034093856811523 ms (0.0013637542724609) binet: 0.040054321289062 ms (0.0016021728515625) memoized: 0.031948089599609 ms (0.0012779235839844) recursive: 42.424917221069 ms (1.6969966888428)
Output for 5.4.11
iterative: 0.043869018554688 ms (0.0017547607421875) binet: 0.056028366088867 ms (0.0022411346435547) memoized: 0.037193298339844 ms (0.0014877319335938) recursive: 52.78491973877 ms (2.1113967895508)
Output for 5.4.10
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 61.294078826904 ms (2.4517631530762)
Output for 5.4.9
iterative: 0.060081481933594 ms (0.0024032592773438) binet: 0.072956085205078 ms (0.0029182434082031) memoized: 0.053882598876953 ms (0.0021553039550781) recursive: 63.287973403931 ms (2.5315189361572)
Output for 5.4.8
iterative: 0.04887580871582 ms (0.0019550323486328) binet: 0.058889389038086 ms (0.0023555755615234) memoized: 0.044107437133789 ms (0.0017642974853516) recursive: 58.748006820679 ms (2.3499202728271)
Output for 5.4.7
iterative: 0.047206878662109 ms (0.0018882751464844) binet: 0.058889389038086 ms (0.0023555755615234) memoized: 0.03814697265625 ms (0.00152587890625) recursive: 57.909965515137 ms (2.3163986206055)
Output for 5.4.6
iterative: 0.051021575927734 ms (0.0020408630371094) binet: 0.072002410888672 ms (0.0028800964355469) memoized: 0.043153762817383 ms (0.0017261505126953) recursive: 61.55800819397 ms (2.4623203277588)
Output for 5.4.5
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.06103515625 ms (0.00244140625) memoized: 0.042200088500977 ms (0.0016880035400391) recursive: 59.489965438843 ms (2.3795986175537)
Output for 5.4.4
iterative: 0.054121017456055 ms (0.0021648406982422) binet: 0.065088272094727 ms (0.0026035308837891) memoized: 0.044107437133789 ms (0.0017642974853516) recursive: 61.131000518799 ms (2.445240020752)
Output for 5.4.3
iterative: 0.054836273193359 ms (0.0021934509277344) binet: 0.065803527832031 ms (0.0026321411132812) memoized: 0.042915344238281 ms (0.0017166137695312) recursive: 60.812950134277 ms (2.4325180053711)
Output for 5.4.2
iterative: 0.066041946411133 ms (0.0026416778564453) binet: 0.071048736572266 ms (0.0028419494628906) memoized: 0.04887580871582 ms (0.0019550323486328) recursive: 61.510801315308 ms (2.4604320526123)
Output for 5.4.1
iterative: 0.063896179199219 ms (0.0025558471679688) binet: 0.077009201049805 ms (0.0030803680419922) memoized: 0.050783157348633 ms (0.0020313262939453) recursive: 60.436010360718 ms (2.4174404144287)
Output for 5.4.0
iterative: 0.036001205444336 ms (0.0014400482177734) binet: 0.044822692871094 ms (0.0017929077148438) memoized: 0.030994415283203 ms (0.0012397766113281) recursive: 45.083999633789 ms (1.8033599853516)
Output for 5.3.29
iterative: 0.047922134399414 ms (0.0019168853759766) binet: 0.049114227294922 ms (0.0019645690917969) memoized: 0.043869018554688 ms (0.0017547607421875) recursive: 94.949007034302 ms (3.7979602813721)
Output for 5.3.28
iterative: 0.030994415283203 ms (0.0012397766113281) binet: 0.036001205444336 ms (0.0014400482177734) memoized: 0.030040740966797 ms (0.0012016296386719) recursive: 55.584192276001 ms (2.22336769104)
Output for 5.3.27
iterative: 0.029087066650391 ms (0.0011634826660156) binet: 0.034093856811523 ms (0.0013637542724609) memoized: 0.033855438232422 ms (0.0013542175292969) recursive: 53.786993026733 ms (2.1514797210693)
Output for 5.3.26
iterative: 0.030040740966797 ms (0.0012016296386719) binet: 0.034093856811523 ms (0.0013637542724609) memoized: 0.026941299438477 ms (0.0010776519775391) recursive: 53.428888320923 ms (2.1371555328369)
Output for 5.3.25
iterative: 0.072956085205078 ms (0.0029182434082031) binet: 0.070095062255859 ms (0.0028038024902344) memoized: 0.06413459777832 ms (0.0025653839111328) recursive: 122.95794487 ms (4.9183177947998)
Output for 5.3.24
iterative: 0.041007995605469 ms (0.0016403198242188) binet: 0.046968460083008 ms (0.0018787384033203) memoized: 0.036001205444336 ms (0.0014400482177734) recursive: 69.267988204956 ms (2.7707195281982)
Output for 5.3.23
iterative: 0.036954879760742 ms (0.0014781951904297) binet: 0.045061111450195 ms (0.0018024444580078) memoized: 0.03504753112793 ms (0.0014019012451172) recursive: 67.509174346924 ms (2.700366973877)
Output for 5.3.22
iterative: 0.05793571472168 ms (0.0023174285888672) binet: 0.066995620727539 ms (0.0026798248291016) memoized: 0.052928924560547 ms (0.0021171569824219) recursive: 86.580991744995 ms (3.4632396697998)
Output for 5.3.21
iterative: 0.036954879760742 ms (0.0014781951904297) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.034093856811523 ms (0.0013637542724609) recursive: 65.696001052856 ms (2.6278400421143)
Output for 5.3.20
iterative: 0.050067901611328 ms (0.0020027160644531) binet: 0.058889389038086 ms (0.0023555755615234) memoized: 0.047206878662109 ms (0.0018882751464844) recursive: 80.068111419678 ms (3.2027244567871)
Output for 5.3.19
iterative: 0.072956085205078 ms (0.0029182434082031) binet: 0.076055526733398 ms (0.0030422210693359) memoized: 0.061988830566406 ms (0.0024795532226562) recursive: 96.947908401489 ms (3.8779163360596)
Output for 5.3.18
iterative: 0.06103515625 ms (0.00244140625) binet: 0.064849853515625 ms (0.002593994140625) memoized: 0.055074691772461 ms (0.0022029876708984) recursive: 94.219923019409 ms (3.7687969207764)
Output for 5.3.17
iterative: 0.059843063354492 ms (0.0023937225341797) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.06103515625 ms (0.00244140625) recursive: 82.173109054565 ms (3.2869243621826)
Output for 5.3.16
iterative: 0.061988830566406 ms (0.0024795532226562) binet: 0.082015991210938 ms (0.0032806396484375) memoized: 0.056982040405273 ms (0.0022792816162109) recursive: 91.897010803223 ms (3.6758804321289)
Output for 5.3.15
iterative: 0.05793571472168 ms (0.0023174285888672) binet: 0.063180923461914 ms (0.0025272369384766) memoized: 0.052928924560547 ms (0.0021171569824219) recursive: 86.01188659668 ms (3.4404754638672)
Output for 5.3.14
iterative: 0.055074691772461 ms (0.0022029876708984) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.050067901611328 ms (0.0020027160644531) recursive: 84.037065505981 ms (3.3614826202393)
Output for 5.3.13
iterative: 0.05793571472168 ms (0.0023174285888672) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.052928924560547 ms (0.0021171569824219) recursive: 86.112022399902 ms (3.4444808959961)
Output for 5.3.12
iterative: 0.042915344238281 ms (0.0017166137695312) binet: 0.050067901611328 ms (0.0020027160644531) memoized: 0.039100646972656 ms (0.0015640258789062) recursive: 73.231935501099 ms (2.9292774200439)
Output for 5.3.11
iterative: 0.059843063354492 ms (0.0023937225341797) binet: 0.063896179199219 ms (0.0025558471679688) memoized: 0.055074691772461 ms (0.0022029876708984) recursive: 81.97808265686 ms (3.2791233062744)
Output for 5.3.10
iterative: 0.056982040405273 ms (0.0022792816162109) binet: 0.064849853515625 ms (0.002593994140625) memoized: 0.052928924560547 ms (0.0021171569824219) recursive: 85.98804473877 ms (3.4395217895508)
Output for 5.3.9
iterative: 0.039100646972656 ms (0.0015640258789062) binet: 0.041961669921875 ms (0.001678466796875) memoized: 0.034093856811523 ms (0.0013637542724609) recursive: 64.571857452393 ms (2.5828742980957)
Output for 5.3.8
iterative: 0.056982040405273 ms (0.0022792816162109) binet: 0.066041946411133 ms (0.0026416778564453) memoized: 0.053167343139648 ms (0.0021266937255859) recursive: 83.68706703186 ms (3.3474826812744)
Output for 5.3.7
iterative: 0.062942504882812 ms (0.0025177001953125) binet: 0.062942504882812 ms (0.0025177001953125) memoized: 0.051021575927734 ms (0.0020408630371094) recursive: 85.690021514893 ms (3.4276008605957)
Output for 5.3.6
iterative: 0.059127807617188 ms (0.0023651123046875) binet: 0.06413459777832 ms (0.0025653839111328) memoized: 0.054121017456055 ms (0.0021648406982422) recursive: 89.338064193726 ms (3.573522567749)
Output for 5.3.5
iterative: 0.065088272094727 ms (0.0026035308837891) binet: 0.077962875366211 ms (0.0031185150146484) memoized: 0.060081481933594 ms (0.0024032592773438) recursive: 84.893941879272 ms (3.3957576751709)
Output for 5.3.4
iterative: 0.06103515625 ms (0.00244140625) binet: 0.065803527832031 ms (0.0026321411132812) memoized: 0.056028366088867 ms (0.0022411346435547) recursive: 79.847097396851 ms (3.193883895874)
Output for 5.3.3
iterative: 0.075101852416992 ms (0.0030040740966797) binet: 0.078916549682617 ms (0.0031566619873047) memoized: 0.06103515625 ms (0.00244140625) recursive: 91.096878051758 ms (3.6438751220703)
Output for 5.3.2
iterative: 0.058889389038086 ms (0.0023555755615234) binet: 0.060796737670898 ms (0.0024318695068359) memoized: 0.056028366088867 ms (0.0022411346435547) recursive: 78.68504524231 ms (3.1474018096924)
Output for 5.3.1
iterative: 0.072002410888672 ms (0.0028800964355469) binet: 0.074863433837891 ms (0.0029945373535156) memoized: 0.065088272094727 ms (0.0026035308837891) recursive: 98.807096481323 ms (3.9522838592529)
Output for 5.3.0
iterative: 0.057220458984375 ms (0.002288818359375) binet: 0.064849853515625 ms (0.002593994140625) memoized: 0.051975250244141 ms (0.0020790100097656) recursive: 80.044031143188 ms (3.2017612457275)
Output for 5.2.17
iterative: 0.06103515625 ms (0.00244140625) binet: 0.05793571472168 ms (0.0023174285888672) memoized: 0.046968460083008 ms (0.0018787384033203) recursive: 92.586994171143 ms (3.7034797668457)
Output for 5.2.16
iterative: 0.10180473327637 ms (0.0040721893310547) binet: 0.085115432739258 ms (0.0034046173095703) memoized: 0.074148178100586 ms (0.0029659271240234) recursive: 120.00894546509 ms (4.8003578186035)
Output for 5.2.15
iterative: 0.10395050048828 ms (0.0041580200195312) binet: 0.10395050048828 ms (0.0041580200195312) memoized: 0.066995620727539 ms (0.0026798248291016) recursive: 128.07607650757 ms (5.1230430603027)
Output for 5.2.14
iterative: 0.089168548583984 ms (0.0035667419433594) binet: 0.080108642578125 ms (0.003204345703125) memoized: 0.069141387939453 ms (0.0027656555175781) recursive: 118.59607696533 ms (4.7438430786133)
Output for 5.2.13
iterative: 0.092983245849609 ms (0.0037193298339844) binet: 0.08392333984375 ms (0.00335693359375) memoized: 0.072002410888672 ms (0.0028800964355469) recursive: 109.53807830811 ms (4.3815231323242)
Output for 5.2.12
iterative: 0.11301040649414 ms (0.0045204162597656) binet: 0.091075897216797 ms (0.0036430358886719) memoized: 0.082015991210938 ms (0.0032806396484375) recursive: 125.50020217896 ms (5.0200080871582)
Output for 5.2.11
iterative: 0.084161758422852 ms (0.0033664703369141) binet: 0.077009201049805 ms (0.0030803680419922) memoized: 0.066041946411133 ms (0.0026416778564453) recursive: 118.20101737976 ms (4.7280406951904)
Output for 5.2.10
iterative: 0.11301040649414 ms (0.0045204162597656) binet: 0.09918212890625 ms (0.00396728515625) memoized: 0.084877014160156 ms (0.0033950805664062) recursive: 110.5420589447 ms (4.4216823577881)
Output for 5.2.9
iterative: 0.10800361633301 ms (0.0043201446533203) binet: 0.086069107055664 ms (0.0034427642822266) memoized: 0.079870223999023 ms (0.0031948089599609) recursive: 114.18700218201 ms (4.5674800872803)
Output for 5.2.8
iterative: 0.08392333984375 ms (0.00335693359375) binet: 0.073909759521484 ms (0.0029563903808594) memoized: 0.065088272094727 ms (0.0026035308837891) recursive: 106.68301582336 ms (4.2673206329346)
Output for 5.2.7
iterative: 0.095129013061523 ms (0.0038051605224609) binet: 0.078916549682617 ms (0.0031566619873047) memoized: 0.072002410888672 ms (0.0028800964355469) recursive: 118.58606338501 ms (4.7434425354004)
Output for 5.2.6
iterative: 0.088930130004883 ms (0.0035572052001953) binet: 0.080108642578125 ms (0.003204345703125) memoized: 0.074148178100586 ms (0.0029659271240234) recursive: 113.46006393433 ms (4.538402557373)
Output for 5.2.5
iterative: 0.090122222900391 ms (0.0036048889160156) binet: 0.077009201049805 ms (0.0030803680419922) memoized: 0.072002410888672 ms (0.0028800964355469) recursive: 111.59610748291 ms (4.4638442993164)
Output for 5.2.4
iterative: 0.086069107055664 ms (0.0034427642822266) binet: 0.077009201049805 ms (0.0030803680419922) memoized: 0.067949295043945 ms (0.0027179718017578) recursive: 114.09306526184 ms (4.5637226104736)
Output for 5.2.3
iterative: 0.10800361633301 ms (0.0043201446533203) binet: 0.08082389831543 ms (0.0032329559326172) memoized: 0.076055526733398 ms (0.0030422210693359) recursive: 126.90401077271 ms (5.0761604309082)
Output for 5.2.2
iterative: 0.089168548583984 ms (0.0035667419433594) binet: 0.082015991210938 ms (0.0032806396484375) memoized: 0.084877014160156 ms (0.0033950805664062) recursive: 107.57517814636 ms (4.3030071258545)
Output for 5.2.1
iterative: 0.063896179199219 ms (0.0025558471679688) binet: 0.06103515625 ms (0.00244140625) memoized: 0.049829483032227 ms (0.0019931793212891) recursive: 95.813989639282 ms (3.8325595855713)
Output for 5.2.0
iterative: 0.069856643676758 ms (0.0027942657470703) binet: 0.060081481933594 ms (0.0024032592773438) memoized: 0.054121017456055 ms (0.0021648406982422) recursive: 97.2900390625 ms (3.8916015625)
Output for 5.1.6
iterative: 0.10514259338379 ms (0.0042057037353516) binet: 0.082969665527344 ms (0.0033187866210938) memoized: 0.081062316894531 ms (0.0032424926757812) recursive: 130.19895553589 ms (5.2079582214355)
Output for 5.1.5
iterative: 0.11706352233887 ms (0.0046825408935547) binet: 0.096797943115234 ms (0.0038719177246094) memoized: 0.093936920166016 ms (0.0037574768066406) recursive: 118.34001541138 ms (4.7336006164551)
Output for 5.1.4
iterative: 0.090837478637695 ms (0.0036334991455078) binet: 0.072002410888672 ms (0.0028800964355469) memoized: 0.069141387939453 ms (0.0027656555175781) recursive: 115.0541305542 ms (4.602165222168)
Output for 5.1.3
iterative: 0.093936920166016 ms (0.0037574768066406) binet: 0.078916549682617 ms (0.0031566619873047) memoized: 0.071048736572266 ms (0.0028419494628906) recursive: 119.92692947388 ms (4.7970771789551)
Output for 5.1.2
iterative: 0.051975250244141 ms (0.0020790100097656) binet: 0.046968460083008 ms (0.0018787384033203) memoized: 0.038862228393555 ms (0.0015544891357422) recursive: 87.677001953125 ms (3.507080078125)
Output for 5.1.1
iterative: 0.092983245849609 ms (0.0037193298339844) binet: 0.076055526733398 ms (0.0030422210693359) memoized: 0.070095062255859 ms (0.0028038024902344) recursive: 108.29901695251 ms (4.3319606781006)
Output for 5.1.0
iterative: 0.090837478637695 ms (0.0036334991455078) binet: 0.081062316894531 ms (0.0032424926757812) memoized: 0.071048736572266 ms (0.0028419494628906) recursive: 115.94295501709 ms (4.6377182006836)
Output for 5.0.5
iterative: 0.19097328186035 ms (0.0076389312744141) binet: 0.084877014160156 ms (0.0033950805664062) memoized: 0.077962875366211 ms (0.0031185150146484) recursive: 165.64798355103 ms (6.625919342041)
Output for 5.0.4
iterative: 0.2129077911377 ms (0.0085163116455078) binet: 0.1368522644043 ms (0.0054740905761719) memoized: 0.12516975402832 ms (0.0050067901611328) recursive: 164.72721099854 ms (6.5890884399414)
Output for 5.0.3
iterative: 0.20217895507812 ms (0.008087158203125) binet: 0.097990036010742 ms (0.0039196014404297) memoized: 0.092983245849609 ms (0.0037193298339844) recursive: 160.30216217041 ms (6.4120864868164)
Output for 5.0.2
iterative: 0.28300285339355 ms (0.011320114135742) binet: 0.10108947753906 ms (0.0040435791015625) memoized: 0.1060962677002 ms (0.0042438507080078) recursive: 173.90608787537 ms (6.9562435150146)
Output for 5.0.1
iterative: 0.16999244689941 ms (0.0067996978759766) binet: 0.078916549682617 ms (0.0031566619873047) memoized: 0.072956085205078 ms (0.0029182434082031) recursive: 146.3987827301 ms (5.8559513092041)
Output for 5.0.0
iterative: 0.19407272338867 ms (0.0077629089355469) binet: 0.087976455688477 ms (0.0035190582275391) memoized: 0.088930130004883 ms (0.0035572052001953) recursive: 161.30709648132 ms (6.4522838592529)
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/BEZQr on line 23
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/BEZQr on line 23
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/BEZQr on line 23
Process exited with code 255.