3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fib ($n) { return round(pow((sqrt(5)+1)/2, $n) / sqrt(5)); } $x = 0; while ($x < 100) { echo fib($x++)+'\n'; }
based on kfMGS
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/BIjrj on line 7 0 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2 Warning: A non-numeric value encountered in /in/BIjrj on line 7 3 Warning: A non-numeric value encountered in /in/BIjrj on line 7 5 Warning: A non-numeric value encountered in /in/BIjrj on line 7 8 Warning: A non-numeric value encountered in /in/BIjrj on line 7 13 Warning: A non-numeric value encountered in /in/BIjrj on line 7 21 Warning: A non-numeric value encountered in /in/BIjrj on line 7 34 Warning: A non-numeric value encountered in /in/BIjrj on line 7 55 Warning: A non-numeric value encountered in /in/BIjrj on line 7 89 Warning: A non-numeric value encountered in /in/BIjrj on line 7 144 Warning: A non-numeric value encountered in /in/BIjrj on line 7 233 Warning: A non-numeric value encountered in /in/BIjrj on line 7 377 Warning: A non-numeric value encountered in /in/BIjrj on line 7 610 Warning: A non-numeric value encountered in /in/BIjrj on line 7 987 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1597 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2584 Warning: A non-numeric value encountered in /in/BIjrj on line 7 4181 Warning: A non-numeric value encountered in /in/BIjrj on line 7 6765 Warning: A non-numeric value encountered in /in/BIjrj on line 7 10946 Warning: A non-numeric value encountered in /in/BIjrj on line 7 17711 Warning: A non-numeric value encountered in /in/BIjrj on line 7 28657 Warning: A non-numeric value encountered in /in/BIjrj on line 7 46368 Warning: A non-numeric value encountered in /in/BIjrj on line 7 75025 Warning: A non-numeric value encountered in /in/BIjrj on line 7 121393 Warning: A non-numeric value encountered in /in/BIjrj on line 7 196418 Warning: A non-numeric value encountered in /in/BIjrj on line 7 317811 Warning: A non-numeric value encountered in /in/BIjrj on line 7 514229 Warning: A non-numeric value encountered in /in/BIjrj on line 7 832040 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1346269 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2178309 Warning: A non-numeric value encountered in /in/BIjrj on line 7 3524578 Warning: A non-numeric value encountered in /in/BIjrj on line 7 5702887 Warning: A non-numeric value encountered in /in/BIjrj on line 7 9227465 Warning: A non-numeric value encountered in /in/BIjrj on line 7 14930352 Warning: A non-numeric value encountered in /in/BIjrj on line 7 24157817 Warning: A non-numeric value encountered in /in/BIjrj on line 7 39088169 Warning: A non-numeric value encountered in /in/BIjrj on line 7 63245986 Warning: A non-numeric value encountered in /in/BIjrj on line 7 102334155 Warning: A non-numeric value encountered in /in/BIjrj on line 7 165580141 Warning: A non-numeric value encountered in /in/BIjrj on line 7 267914296 Warning: A non-numeric value encountered in /in/BIjrj on line 7 433494437 Warning: A non-numeric value encountered in /in/BIjrj on line 7 701408733 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1134903170 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1836311903 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2971215073 Warning: A non-numeric value encountered in /in/BIjrj on line 7 4807526976 Warning: A non-numeric value encountered in /in/BIjrj on line 7 7778742049 Warning: A non-numeric value encountered in /in/BIjrj on line 7 12586269025 Warning: A non-numeric value encountered in /in/BIjrj on line 7 20365011074 Warning: A non-numeric value encountered in /in/BIjrj on line 7 32951280099 Warning: A non-numeric value encountered in /in/BIjrj on line 7 53316291173 Warning: A non-numeric value encountered in /in/BIjrj on line 7 86267571272 Warning: A non-numeric value encountered in /in/BIjrj on line 7 139583862445 Warning: A non-numeric value encountered in /in/BIjrj on line 7 225851433717 Warning: A non-numeric value encountered in /in/BIjrj on line 7 365435296162 Warning: A non-numeric value encountered in /in/BIjrj on line 7 591286729879 Warning: A non-numeric value encountered in /in/BIjrj on line 7 956722026041 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1548008755920 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2504730781961 Warning: A non-numeric value encountered in /in/BIjrj on line 7 4052739537881 Warning: A non-numeric value encountered in /in/BIjrj on line 7 6557470319842 Warning: A non-numeric value encountered in /in/BIjrj on line 7 10610209857723 Warning: A non-numeric value encountered in /in/BIjrj on line 7 17167680177565 Warning: A non-numeric value encountered in /in/BIjrj on line 7 27777890035288 Warning: A non-numeric value encountered in /in/BIjrj on line 7 44945570212853 Warning: A non-numeric value encountered in /in/BIjrj on line 7 72723460248141 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.1766903046099E+14 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.9039249070914E+14 Warning: A non-numeric value encountered in /in/BIjrj on line 7 3.0806152117013E+14 Warning: A non-numeric value encountered in /in/BIjrj on line 7 4.9845401187926E+14 Warning: A non-numeric value encountered in /in/BIjrj on line 7 8.065155330494E+14 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.3049695449287E+15 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2.1114850779781E+15 Warning: A non-numeric value encountered in /in/BIjrj on line 7 3.4164546229067E+15 Warning: A non-numeric value encountered in /in/BIjrj on line 7 5.5279397008848E+15 Warning: A non-numeric value encountered in /in/BIjrj on line 7 8.9443943237915E+15 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.4472334024676E+16 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2.3416728348468E+16 Warning: A non-numeric value encountered in /in/BIjrj on line 7 3.7889062373144E+16 Warning: A non-numeric value encountered in /in/BIjrj on line 7 6.1305790721612E+16 Warning: A non-numeric value encountered in /in/BIjrj on line 7 9.9194853094756E+16 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.6050064381637E+17 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2.5969549691112E+17 Warning: A non-numeric value encountered in /in/BIjrj on line 7 4.2019614072749E+17 Warning: A non-numeric value encountered in /in/BIjrj on line 7 6.7989163763861E+17 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.1000877783661E+18 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.7799794160047E+18 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2.8800671943708E+18 Warning: A non-numeric value encountered in /in/BIjrj on line 7 4.6600466103755E+18 Warning: A non-numeric value encountered in /in/BIjrj on line 7 7.5401138047464E+18 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.2200160415122E+19 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.9740274219868E+19 Warning: A non-numeric value encountered in /in/BIjrj on line 7 3.194043463499E+19 Warning: A non-numeric value encountered in /in/BIjrj on line 7 5.1680708854858E+19 Warning: A non-numeric value encountered in /in/BIjrj on line 7 8.3621143489849E+19 Warning: A non-numeric value encountered in /in/BIjrj on line 7 1.3530185234471E+20 Warning: A non-numeric value encountered in /in/BIjrj on line 7 2.1892299583456E+20
Output for 4.3.0 - 5.2.1, 5.2.7 - 7.0.20
01123581321345589144233377610987159725844181676510946177112865746368750251213931964183178115142298320401346269217830935245785702887922746514930352241578173908816963245986102334155165580141267914296433494437701408733113490317018363119032971215073480752697677787420491258626902520365011074329512800995331629117386267571272139583862445225851433717365435296162591286729879956722026041154800875592025047307819614052739537881655747031984210610209857723171676801775652777789003528844945570212853727234602481411.1766903046099E+141.9039249070914E+143.0806152117013E+144.9845401187926E+148.065155330494E+141.3049695449287E+152.1114850779781E+153.4164546229067E+155.5279397008848E+158.9443943237915E+151.4472334024676E+162.3416728348468E+163.7889062373144E+166.1305790721612E+169.9194853094756E+161.6050064381637E+172.5969549691112E+174.2019614072749E+176.7989163763861E+171.1000877783661E+181.7799794160047E+182.8800671943708E+184.6600466103755E+187.5401138047464E+181.2200160415122E+191.9740274219868E+193.194043463499E+195.1680708854858E+198.3621143489849E+191.3530185234471E+202.1892299583456E+20
Output for 5.2.2 - 5.2.6
01123581321345589144233377610987159725844181676510946177112865746368750251213931964183178115142298320401346269217830935245785702887922746514930352241578173908816963245986102334155165580141267914296433494437701408733113490317018363119032971215073480752697677787420491258626902520365011074329512800995331629117386267571272139583862445225851433717365435296162591286729879956722026041154800875592025047307819614052739537881655747031984210610209857723171676801775652777789003528844945570212853727234602481411176690304609901903924907091403080615211701304984540118792608065155330494001304969544928700211148507797810034164546229067005527939700884800894439432379150014472334024676000234167283484680003788906237314400061305790721612000991948530947560001605006438163700002596954969111200004201961407274900006798916376386100001.1000877783661E+181.7799794160047E+182.8800671943708E+184.6600466103755E+187.5401138047464E+181.2200160415122E+191.9740274219868E+193.194043463499E+195.1680708854858E+198.3621143489849E+191.3530185234471E+202.1892299583456E+20