3v4l.org

run code in 300+ PHP versions simultaneously
<?php function magic($p, $q) { return ($q == 0) ? $p : magic($q, $p % $q); } var_dump(magic(1024, 1000));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/udVIG
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'magic'
          2        SEND_VAL                                                 1024
          3        SEND_VAL                                                 1000
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function magic:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/udVIG
function name:  magic
number of ops:  14
compiled vars:  !0 = $p, !1 = $q
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        IS_EQUAL                                                 !1, 0
          3      > JMPZ                                                     ~2, ->6
    4     4    >   QM_ASSIGN                                        ~3      !0
          5      > JMP                                                      ->12
    5     6    >   INIT_FCALL_BY_NAME                                       'magic'
          7        SEND_VAR_EX                                              !1
          8        MOD                                              ~4      !0, !1
          9        SEND_VAL_EX                                              ~4
         10        DO_FCALL                                      0  $5      
         11        QM_ASSIGN                                        ~3      $5
         12    > > RETURN                                                   ~3
    6    13*     > RETURN                                                   null

End of function magic

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.48 ms | 1397 KiB | 16 Q