3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add($x) { $totaldays = $x; Return $totaldays; } function calculate($totaldays) { $result = 1000/$totaldays; Return $result; } $totaldays = add(10); Echo calculate($totaldays);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7Usk2
function name:  (null)
number of ops:  9
compiled vars:  !0 = $totaldays
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'add'
          1        SEND_VAL                                                 10
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   15     4        INIT_FCALL                                               'calculate'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $3      
          7        ECHO                                                     $3
          8      > RETURN                                                   1

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

End of function add

Function calculate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7Usk2
function name:  calculate
number of ops:  5
compiled vars:  !0 = $totaldays, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        DIV                                              ~2      1000, !0
          2        ASSIGN                                                   !1, ~2
   11     3      > RETURN                                                   !1
   12     4*     > RETURN                                                   null

End of function calculate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.24 ms | 1437 KiB | 15 Q