3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $test; function getTest() { return $this->test; } function setTest($test) { $this->test = $test; } } function blabla($lol) { $lol->setTest('Cookies'); } $B = new A; blabla($B); echo $B->getTest();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oAVgt
function name:  (null)
number of ops:  10
compiled vars:  !0 = $B
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_FCALL                                               'blabla'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   14     6        INIT_METHOD_CALL                                         !0, 'getTest'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Function blabla:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oAVgt
function name:  blabla
number of ops:  5
compiled vars:  !0 = $lol
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_METHOD_CALL                                         !0, 'setTest'
          2        SEND_VAL_EX                                              'Cookies'
          3        DO_FCALL                                      0          
   10     4      > RETURN                                                   null

End of function blabla

Class A:
Function gettest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oAVgt
function name:  getTest
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_OBJ_R                                      ~0      'test'
          1      > RETURN                                                   ~0
          2*     > RETURN                                                   null

End of function gettest

Function settest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oAVgt
function name:  setTest
number of ops:  4
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'test'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function settest

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.42 ms | 1399 KiB | 14 Q