3v4l.org

run code in 300+ PHP versions simultaneously
<?php function magic($p, $q) { if ($q == 0) { var_dump('$p: ' . $p); var_dump('$q: ' . $q); return $p; } else { var_dump('$p: ' . $p); var_dump('$q: ' . $q); return 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/LiIiu
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     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 = 14
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LiIiu
function name:  magic
number of ops:  29
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, ->14
    4     4    >   INIT_FCALL                                               'var_dump'
          5        CONCAT                                           ~3      '%24p%3A+', !0
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'var_dump'
          9        CONCAT                                           ~5      '%24q%3A+', !1
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
    6    12      > RETURN                                                   !0
         13*       JMP                                                      ->28
    8    14    >   INIT_FCALL                                               'var_dump'
         15        CONCAT                                           ~7      '%24p%3A+', !0
         16        SEND_VAL                                                 ~7
         17        DO_ICALL                                                 
    9    18        INIT_FCALL                                               'var_dump'
         19        CONCAT                                           ~9      '%24q%3A+', !1
         20        SEND_VAL                                                 ~9
         21        DO_ICALL                                                 
   10    22        INIT_FCALL_BY_NAME                                       'magic'
         23        SEND_VAR_EX                                              !1
         24        MOD                                              ~11     !0, !1
         25        SEND_VAL_EX                                              ~11
         26        DO_FCALL                                      0  $12     
         27      > RETURN                                                   $12
   12    28*     > RETURN                                                   null

End of function magic

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.17 ms | 1399 KiB | 16 Q