3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ private $id='iddebut'; private $nomTest='nomdebut'; public function __call($name, $args) { echo "\n----".$name; var_dump($args); } public function __get($name) { echo "\ngetting----".$name; return $this->$name; } public function __set($name, $args) { echo "\nsetting".$name; var_dump($args); $this->$name=$args; return $this; ///fdf } } $a = new A(); echo "\n".$a->getId('ceci est un argument'); 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/Y7tFT
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   34     3        INIT_METHOD_CALL                                         !0, 'getId'
          4        SEND_VAL_EX                                              'ceci+est+un+argument'
          5        DO_FCALL                                      0  $4      
          6        CONCAT                                           ~5      '%0A', $4
          7        ECHO                                                     ~5
   35     8        FETCH_OBJ_R                                      ~6      !0, 'id'
          9        CONCAT                                           ~7      '%0A', ~6
         10        ECHO                                                     ~7
   36    11        FETCH_OBJ_R                                      ~8      !0, 'nomTest'
         12        CONCAT                                           ~9      '%0A', ~8
         13        ECHO                                                     ~9
   38    14        ASSIGN_OBJ                                               !0, 'id'
         15        OP_DATA                                                  'nouvel+id'
   39    16        ASSIGN_OBJ                                               !0, 'nomTest'
         17        OP_DATA                                                  'nouvel+id'
         18      > RETURN                                                   1

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

End of function __call

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y7tFT
function name:  __get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        CONCAT                                           ~1      '%0Agetting----', !0
          2        ECHO                                                     ~1
   18     3        FETCH_OBJ_R                                      ~2      !0
          4      > RETURN                                                   ~2
   19     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/Y7tFT
function name:  __set
number of ops:  12
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   24     2        CONCAT                                           ~2      '%0Asetting', !0
          3        ECHO                                                     ~2
   25     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
   26     7        ASSIGN_OBJ                                               !0
          8        OP_DATA                                                  !1
   27     9        FETCH_THIS                                       ~5      
         10      > RETURN                                                   ~5
   29    11*     > RETURN                                                   null

End of function __set

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.98 ms | 1400 KiB | 15 Q