3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gcd($n,$m){ while($n!=0){ $temp = $n%$m; $n = $m; $m = $temp; } return $n; } echo gcd(6,8);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kQ5k0
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'gcd'
          1        SEND_VAL                                                 6
          2        SEND_VAL                                                 8
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function gcd:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/kQ5k0
function name:  gcd
number of ops:  11
compiled vars:  !0 = $n, !1 = $m, !2 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2      > JMP                                                      ->7
    5     3    >   MOD                                              ~3      !0, !1
          4        ASSIGN                                                   !2, ~3
    6     5        ASSIGN                                                   !0, !1
    7     6        ASSIGN                                                   !1, !2
    4     7    >   IS_NOT_EQUAL                                             !0, 0
          8      > JMPNZ                                                    ~7, ->3
    9     9    > > RETURN                                                   !0
   10    10*     > RETURN                                                   null

End of function gcd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.32 ms | 1397 KiB | 14 Q