3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fibo($n) { if ($n == 0) { return 0; } if ($n == 1) { return 1; } return fibo($n - 1) + fibo($n - 2); } $order = 35; echo "Fibo($order):\n"; $s = microtime(true); var_dump(fibo($order)); $e = microtime(true); echo "HHVM In " . ($e - $s) . " Seconds\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Uk2Xt
function name:  (null)
number of ops:  24
compiled vars:  !0 = $order, !1 = $s, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN                                                   !0, 35
   17     1        ROPE_INIT                                     3  ~5      'Fibo%28'
          2        ROPE_ADD                                      1  ~5      ~5, !0
          3        ROPE_END                                      2  ~4      ~5, '%29%3A%0A'
          4        ECHO                                                     ~4
   19     5        INIT_FCALL                                               'microtime'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !1, $7
   20     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'fibo'
         11        SEND_VAR                                                 !0
         12        DO_FCALL                                      0  $9      
         13        SEND_VAR                                                 $9
         14        DO_ICALL                                                 
   21    15        INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !2, $11
   22    19        SUB                                              ~13     !2, !1
         20        CONCAT                                           ~14     'HHVM+In+', ~13
         21        CONCAT                                           ~15     ~14, '+Seconds%0A'
         22        ECHO                                                     ~15
         23      > RETURN                                                   1

Function fibo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Uk2Xt
function name:  fibo
number of ops:  18
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_EQUAL                                                 !0, 0
          2      > JMPZ                                                     ~1, ->4
    5     3    > > RETURN                                                   0
    7     4    >   IS_EQUAL                                                 !0, 1
          5      > JMPZ                                                     ~2, ->7
    8     6    > > RETURN                                                   1
   10     7    >   INIT_FCALL_BY_NAME                                       'fibo'
          8        SUB                                              ~3      !0, 1
          9        SEND_VAL_EX                                              ~3
         10        DO_FCALL                                      0  $4      
         11        INIT_FCALL_BY_NAME                                       'fibo'
         12        SUB                                              ~5      !0, 2
         13        SEND_VAL_EX                                              ~5
         14        DO_FCALL                                      0  $6      
         15        ADD                                              ~7      $4, $6
         16      > RETURN                                                   ~7
   11    17*     > RETURN                                                   null

End of function fibo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.66 ms | 1403 KiB | 18 Q