3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bla = new Bla(); echo ($bla->meh()); class bla { function meh() { $a = 10; for ($i = 0; $i < 999; $i++) { $a++; $a = ($a * 2) + 5; $obj = new bla2; $obj->setOffset($i); $a += $obj->getMeh(); } return $a; } } class bla2 { protected $offset; function setOffset($offset) { $this->offset = $offset; } function getMeh() { $offset = $this->offset; return ($offset * ($offset / 2)) + 5; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UomXc
function name:  (null)
number of ops:  7
compiled vars:  !0 = $bla
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'Bla'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    5     3        INIT_METHOD_CALL                                         !0, 'meh'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
   38     6      > RETURN                                                   1

Class bla:
Function meh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
Branch analysis from position: 3
filename:       /in/UomXc
function name:  meh
number of ops:  21
compiled vars:  !0 = $a, !1 = $i, !2 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 10
   12     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->17
   13     3    >   PRE_INC                                                  !0
   14     4        MUL                                              ~6      !0, 2
          5        ADD                                              ~7      ~6, 5
          6        ASSIGN                                                   !0, ~7
   16     7        NEW                                              $9      'bla2'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $9
   17    10        INIT_METHOD_CALL                                         !2, 'setOffset'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
   19    13        INIT_METHOD_CALL                                         !2, 'getMeh'
         14        DO_FCALL                                      0  $13     
         15        ASSIGN_OP                                     1          !0, $13
   12    16        PRE_INC                                                  !1
         17    >   IS_SMALLER                                               !1, 999
         18      > JMPNZ                                                    ~16, ->3
   22    19    > > RETURN                                                   !0
   23    20*     > RETURN                                                   null

End of function meh

End of class bla.

Class bla2:
Function setoffset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UomXc
function name:  setOffset
number of ops:  4
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
   30     1        ASSIGN_OBJ                                               'offset'
          2        OP_DATA                                                  !0
   31     3      > RETURN                                                   null

End of function setoffset

Function getmeh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UomXc
function name:  getMeh
number of ops:  7
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   FETCH_OBJ_R                                      ~1      'offset'
          1        ASSIGN                                                   !0, ~1
   36     2        DIV                                              ~3      !0, 2
          3        MUL                                              ~4      !0, ~3
          4        ADD                                              ~5      ~4, 5
          5      > RETURN                                                   ~5
   37     6*     > RETURN                                                   null

End of function getmeh

End of class bla2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.51 ms | 1399 KiB | 13 Q