3v4l.org

run code in 300+ PHP versions simultaneously
<?php $kms =300; $litres=40; function calc_milege() { $result=$GLOBAL['kms']/$GLOBAL['litres']; return $result; } $c=calc_milege(); print "milege=".$c;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p2J85
function name:  (null)
number of ops:  8
compiled vars:  !0 = $kms, !1 = $litres, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 300
    4     1        ASSIGN                                                   !1, 40
   11     2        INIT_FCALL                                               'calc_milege'
          3        DO_FCALL                                      0  $5      
          4        ASSIGN                                                   !2, $5
   12     5        CONCAT                                           ~7      'milege%3D', !2
          6        ECHO                                                     ~7
          7      > RETURN                                                   1

Function calc_milege:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p2J85
function name:  calc_milege
number of ops:  6
compiled vars:  !0 = $result, !1 = $GLOBAL
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_DIM_R                                      ~2      !1, 'kms'
          1        FETCH_DIM_R                                      ~3      !1, 'litres'
          2        DIV                                              ~4      ~2, ~3
          3        ASSIGN                                                   !0, ~4
    8     4      > RETURN                                                   !0
   10     5*     > RETURN                                                   null

End of function calc_milege

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.72 ms | 1397 KiB | 14 Q