3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add(int $a, int $b) { return $a + $b; } $a = 5; $b = 3; settype($a, int); settype($b, int); echo(add($a, $b));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7kpRc
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 5
    8     1        ASSIGN                                                   !1, 3
    9     2        INIT_FCALL                                               'settype'
          3        SEND_REF                                                 !0
          4        FETCH_CONSTANT                                   ~4      'int'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   10     7        INIT_FCALL                                               'settype'
          8        SEND_REF                                                 !1
          9        FETCH_CONSTANT                                   ~6      'int'
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                                 
   11    12        INIT_FCALL                                               'add'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_FCALL                                      0  $8      
         16        ECHO                                                     $8
         17      > RETURN                                                   1

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7kpRc
function name:  add
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ADD                                              ~2      !0, !1
          3      > RETURN                                                   ~2
    5     4*     > RETURN                                                   null

End of function add

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.68 ms | 1398 KiB | 16 Q