3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bla { protected $bla; public function setBla($newBla) { if (isset($this->bla)) { throw new Exception('Erro: valor já foi setado'); } $this->bla = $newBla; } public function getBla() { return $this->bla; } } $x = new Bla(); var_dump($x);echo'<br/>'; $x->setBla(2); var_dump($x);echo'<br/>'; $x->setBla(3); var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W5bWM
function name:  (null)
number of ops:  21
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Bla'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
          6        ECHO                                                     '%3Cbr%2F%3E'
   23     7        INIT_METHOD_CALL                                         !0, 'setBla'
          8        SEND_VAL_EX                                              2
          9        DO_FCALL                                      0          
   24    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13        ECHO                                                     '%3Cbr%2F%3E'
   25    14        INIT_METHOD_CALL                                         !0, 'setBla'
         15        SEND_VAL_EX                                              3
         16        DO_FCALL                                      0          
   26    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Class Bla:
Function setbla:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W5bWM
function name:  setBla
number of ops:  10
compiled vars:  !0 = $newBla
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ISSET_ISEMPTY_PROP_OBJ                                   'bla'
          2      > JMPZ                                                     ~1, ->7
    9     3    >   NEW                                              $2      'Exception'
          4        SEND_VAL_EX                                              'Erro%3A+valor+j%C3%A1+foi+setado'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
   11     7    >   ASSIGN_OBJ                                               'bla'
          8        OP_DATA                                                  !0
   12     9      > 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/W5bWM
function name:  getBla
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~0      'bla'
          1      > RETURN                                                   ~0
   17     2*     > RETURN                                                   null

End of function getbla

End of class Bla.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.12 ms | 1400 KiB | 15 Q