3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function multiply(float $x, float $y) { return $x * $y; } function add(int $x, int $y) { return $x + $y; } var_dump(multiply(2.5, 3.5)); // float(7) var_dump(add('2', 3));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uHWbN
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'multiply'
          2        SEND_VAL                                                 2.5
          3        SEND_VAL                                                 3.5
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
   16     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'add'
          9        SEND_VAL                                                 '2'
         10        SEND_VAL                                                 3
         11        DO_FCALL                                      0  $2      
         12        SEND_VAR                                                 $2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function multiply

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

End of function add

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.79 ms | 1399 KiB | 17 Q