3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Accepting NULL value */ function test(stdClass $obj) { $obj->v=$b; echo $obj->v; } $b="a"; test(new stdclass($b)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMhWA
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'a'
    9     1        INIT_FCALL                                               'test'
          2        NEW                                              $2      'stdclass'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $2
          6        DO_FCALL                                      0          
   13     7      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PMhWA
function name:  test
number of ops:  6
compiled vars:  !0 = $obj, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN_OBJ                                               !0, 'v'
          2        OP_DATA                                                  !1
    6     3        FETCH_OBJ_R                                      ~3      !0, 'v'
          4        ECHO                                                     ~3
    7     5      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.89 ms | 1396 KiB | 14 Q