3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pascal($i,$j) { //$i la ligne et $j la colonne du triangle if($i == 0 OR $j==1 OR $i==$j-1) return 1; else { $coeff= pascal($i-1,$j) + pascal($i-1,$j-1); return $coeff; } } echo pascal(1,3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5p88v
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'pascal'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 3
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function pascal:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Branch analysis from position: 6
filename:       /in/5p88v
function name:  pascal
number of ops:  28
compiled vars:  !0 = $i, !1 = $j, !2 = $coeff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        IS_EQUAL                                         ~3      !0, 0
          3      > JMPNZ_EX                                         ~3      ~3, ->6
          4    >   IS_EQUAL                                         ~4      !1, 1
          5        BOOL                                             ~3      ~4
          6    > > JMPNZ_EX                                         ~3      ~3, ->10
          7    >   SUB                                              ~5      !1, 1
          8        IS_EQUAL                                         ~6      !0, ~5
          9        BOOL                                             ~3      ~6
         10    > > JMPZ                                                     ~3, ->13
         11    > > RETURN                                                   1
         12*       JMP                                                      ->27
    9    13    >   INIT_FCALL_BY_NAME                                       'pascal'
         14        SUB                                              ~7      !0, 1
         15        SEND_VAL_EX                                              ~7
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $8      
         18        INIT_FCALL_BY_NAME                                       'pascal'
         19        SUB                                              ~9      !0, 1
         20        SEND_VAL_EX                                              ~9
         21        SUB                                              ~10     !1, 1
         22        SEND_VAL_EX                                              ~10
         23        DO_FCALL                                      0  $11     
         24        ADD                                              ~12     $8, $11
         25        ASSIGN                                                   !2, ~12
   10    26      > RETURN                                                   !2
   12    27*     > RETURN                                                   null

End of function pascal

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.11 ms | 1399 KiB | 14 Q