3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ public $id='iddebut'; public $nomTest='nomdebut'; public function __get($name) { echo "\n----".$name; return $this->$name; } public function __set($name, $args) { var_dump($args); echo "\n".$name; return $this->$name; } } $a = new A(); echo "\n".$a->id; echo "\n".$a->nomTest; $a->id = 'nouvel id'; $a->nomTest = 'nouvel id';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M8Oif
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        FETCH_OBJ_R                                      ~4      !0, 'id'
          4        CONCAT                                           ~5      '%0A', ~4
          5        ECHO                                                     ~5
   27     6        FETCH_OBJ_R                                      ~6      !0, 'nomTest'
          7        CONCAT                                           ~7      '%0A', ~6
          8        ECHO                                                     ~7
   29     9        ASSIGN_OBJ                                               !0, 'id'
         10        OP_DATA                                                  'nouvel+id'
   30    11        ASSIGN_OBJ                                               !0, 'nomTest'
         12        OP_DATA                                                  'nouvel+id'
         13      > RETURN                                                   1

Class A:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M8Oif
function name:  __get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        CONCAT                                           ~1      '%0A----', !0
          2        ECHO                                                     ~1
   12     3        FETCH_OBJ_R                                      ~2      !0
          4      > RETURN                                                   ~2
   13     5*     > RETURN                                                   null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M8Oif
function name:  __set
number of ops:  10
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                                 
   18     5        CONCAT                                           ~3      '%0A', !0
          6        ECHO                                                     ~3
   19     7        FETCH_OBJ_R                                      ~4      !0
          8      > RETURN                                                   ~4
   20     9*     > RETURN                                                   null

End of function __set

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.46 ms | 1396 KiB | 15 Q