3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bla { protected $bla; public function setBla($newBla) { $this->bla = $newBla; unset($this->setBla); } public function getBla() { return $this->bla; } } $x = new Bla(); $x->setBla(2); echo $x->getBla(); $x->setBla(3); echo $x->getBla();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUPXU
function name:  (null)
number of ops:  16
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Bla'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'setBla'
          4        SEND_VAL_EX                                              2
          5        DO_FCALL                                      0          
   21     6        INIT_METHOD_CALL                                         !0, 'getBla'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
   22     9        INIT_METHOD_CALL                                         !0, 'setBla'
         10        SEND_VAL_EX                                              3
         11        DO_FCALL                                      0          
   23    12        INIT_METHOD_CALL                                         !0, 'getBla'
         13        DO_FCALL                                      0  $7      
         14        ECHO                                                     $7
         15      > RETURN                                                   1

Class Bla:
Function setbla:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUPXU
function name:  setBla
number of ops:  5
compiled vars:  !0 = $newBla
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'bla'
          2        OP_DATA                                                  !0
    9     3        UNSET_OBJ                                                'setBla'
   10     4      > RETURN                                                   null

End of function setbla

Function getbla:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUPXU
function name:  getBla
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'bla'
          1      > RETURN                                                   ~0
   15     2*     > RETURN                                                   null

End of function getbla

End of class Bla.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.54 ms | 1395 KiB | 13 Q