3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Cosa { public $nombe = ""; } $cosa = new Cosa(); $cosa->nombre = "Madera"; function fabricar(Cosa $cosa) { $cosa->nombre = "Puerta"; } var_dump($cosa->nombre); fabricar($cosa); var_dump($cosa->nombre);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l2al3
function name:  (null)
number of ops:  17
compiled vars:  !0 = $cosa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'Cosa'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    7     3        ASSIGN_OBJ                                               !0, 'nombre'
          4        OP_DATA                                                  'Madera'
   13     5        INIT_FCALL                                               'var_dump'
          6        FETCH_OBJ_R                                      ~5      !0, 'nombre'
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                                 
   14     9        INIT_FCALL                                               'fabricar'
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0          
   15    12        INIT_FCALL                                               'var_dump'
         13        FETCH_OBJ_R                                      ~8      !0, 'nombre'
         14        SEND_VAL                                                 ~8
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function fabricar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l2al3
function name:  fabricar
number of ops:  4
compiled vars:  !0 = $cosa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ASSIGN_OBJ                                               !0, 'nombre'
          2        OP_DATA                                                  'Puerta'
   11     3      > RETURN                                                   null

End of function fabricar

Class Cosa: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.49 ms | 1398 KiB | 16 Q