3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Math { public function add($op1, $op2) { if(($op1 instanceof Float) && ($op2 instanceof Float)) { return $op1->getFloat() + $op2->getFloat(); } else { echo "Must pass two Floats!\n"; } } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vInpf
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   1

Class Math:
Function add:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/vInpf
function name:  add
number of ops:  16
compiled vars:  !0 = $op1, !1 = $op2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INSTANCEOF                                       ~2      !0, 'Float'
          3      > JMPZ_EX                                          ~2      ~2, ->6
          4    >   INSTANCEOF                                       ~3      !1, 'Float'
          5        BOOL                                             ~2      ~3
          6    > > JMPZ                                                     ~2, ->14
    5     7    >   INIT_METHOD_CALL                                         !0, 'getFloat'
          8        DO_FCALL                                      0  $4      
          9        INIT_METHOD_CALL                                         !1, 'getFloat'
         10        DO_FCALL                                      0  $5      
         11        ADD                                              ~6      $4, $5
         12      > RETURN                                                   ~6
         13*       JMP                                                      ->15
    7    14    >   ECHO                                                     'Must+pass+two+Floats%21%0A'
    9    15      > RETURN                                                   null

End of function add

End of class Math.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.33 ms | 1394 KiB | 13 Q