3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myclass { public $channel_data; function __construct() { $this->channel_data = "herp"; } function overrideChannelData($channel_data) { $this->channel_data = $channel_data; } } $class = new myclass; $class->overrideChannelData("derp"); var_dump($class->channel_data); // returns "herp"
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eircn
function name:  (null)
number of ops:  11
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'myclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'overrideChannelData'
          4        SEND_VAL_EX                                              'derp'
          5        DO_FCALL                                      0          
   15     6        INIT_FCALL                                               'var_dump'
          7        FETCH_OBJ_R                                      ~5      !0, 'channel_data'
          8        SEND_VAL                                                 ~5
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class myclass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eircn
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN_OBJ                                               'channel_data'
          1        OP_DATA                                                  'herp'
    6     2      > RETURN                                                   null

End of function __construct

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

End of function overridechanneldata

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.86 ms | 1395 KiB | 15 Q