3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bla { protected $bla; public function setBla($newBla) { $this->setBla = function() { echo 'novo setBla'; }; $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/FF56J
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

Function %00%7Bclosure%7D%2Fin%2FFF56J%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FF56J
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'novo+setBla'
   10     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFF56J%3A8%240

Class Bla:
Function setbla:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FF56J
function name:  setBla
number of ops:  7
compiled vars:  !0 = $newBla
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFF56J%3A8%240'
          2        ASSIGN_OBJ                                               'setBla'
   10     3        OP_DATA                                                  ~2
   11     4        ASSIGN_OBJ                                               'bla'
          5        OP_DATA                                                  !0
   12     6      > 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/FF56J
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:
138.65 ms | 1400 KiB | 15 Q