3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyTable { private $name; private $id; public function __set($p, $v) { # $this->{$p} = $v; return $this->$p(); } private function name() { return 'x'; } } $oMyTable = new MyTable(); $o = $oMyTable->name = 'Felipe'; var_dump($o); $o = $oMyTable->id = '2'; var_dump($o); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ksZnb
function name:  (null)
number of ops:  16
compiled vars:  !0 = $oMyTable, !1 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $2      'MyTable'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   24     3        ASSIGN_OBJ                                       ~5      !0, 'name'
          4        OP_DATA                                                  'Felipe'
          5        ASSIGN                                                   !1, ~5
   25     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   27     9        ASSIGN_OBJ                                       ~8      !0, 'id'
         10        OP_DATA                                                  '2'
         11        ASSIGN                                                   !1, ~8
   28    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
   30    15      > RETURN                                                   1

Class MyTable:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ksZnb
function name:  __set
number of ops:  6
compiled vars:  !0 = $p, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        INIT_METHOD_CALL                                         !0
          3        DO_FCALL                                      0  $2      
          4      > RETURN                                                   $2
   12     5*     > RETURN                                                   null

End of function __set

Function name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ksZnb
function name:  name
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                   'x'
   17     1*     > RETURN                                                   null

End of function name

End of class MyTable.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.5 ms | 1396 KiB | 15 Q