3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* class A { public function __set($name, $value) { echo func_get_arg(0); $name = "xxx"; echo func_get_arg(0); } public function test($name) { echo func_get_arg(0); $name = "xxx"; echo func_get_arg(0); } } $a = new A(); $a->test('test'); $a->test = 5; function byVal($arg) { echo 'As passed : ', var_export(func_get_arg(0)), PHP_EOL; $arg = 'baz'; echo 'After change : ', var_export(func_get_arg(0)), PHP_EOL; } function byRef(&$arg) { echo 'As passed : ', var_export(func_get_arg(0)), PHP_EOL; $arg = 'baz'; echo 'After change : ', var_export(func_get_arg(0)), PHP_EOL; } $arg = 'bar'; byVal($arg); byRef($arg); */ function set($name, $value) { $a = array(); echo $name; // property setter support $originalName = $name; $name[0] = $name[0] & "\xDF"; // case-sensitive checking, capitalize first character echo $name; // protected attribute support $properties = $this->listObjectProperties(); if (isset($a[$name = $originalName])) { echo $name; } echo $name; } set('user', 'test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K1OX2
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   61     0  E >   INIT_FCALL                                               'set'
          1        SEND_VAL                                                 'user'
          2        SEND_VAL                                                 'test'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/K1OX2
function name:  set
number of ops:  20
compiled vars:  !0 = $name, !1 = $value, !2 = $a, !3 = $originalName, !4 = $properties
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   43     2        ASSIGN                                                   !2, <array>
   45     3        ECHO                                                     !0
   48     4        ASSIGN                                                   !3, !0
   49     5        FETCH_DIM_R                                      ~8      !0, 0
          6        BW_AND                                           ~9      ~8, '%DF'
          7        ASSIGN_DIM                                               !0, 0
          8        OP_DATA                                                  ~9
   51     9        ECHO                                                     !0
   54    10        FETCH_THIS                                       $10     
         11        INIT_METHOD_CALL                                         $10, 'listObjectProperties'
         12        DO_FCALL                                      0  $11     
         13        ASSIGN                                                   !4, $11
   55    14        ASSIGN                                           ~13     !0, !3
         15        ISSET_ISEMPTY_DIM_OBJ                         0          !2, ~13
         16      > JMPZ                                                     ~14, ->18
   56    17    >   ECHO                                                     !0
   58    18    >   ECHO                                                     !0
   59    19      > RETURN                                                   null

End of function set

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.8 ms | 1389 KiB | 14 Q