3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo($object) { $object = null; } function bar(&$object) { $object = null; } $o = new stdClass(); var_dump($o); foo($o); var_dump($o); bar($o); var_dump($o);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/04vX5
function name:  (null)
number of ops:  19
compiled vars:  !0 = $o
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $1      'stdClass'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   12     3        INIT_FCALL                                                   'var_dump'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                                     
   13     6        INIT_FCALL                                                   'foo'
          7        SEND_VAR                                                     !0
          8        DO_FCALL                                          0          
   14     9        INIT_FCALL                                                   'var_dump'
         10        SEND_VAR                                                     !0
         11        DO_ICALL                                                     
   15    12        INIT_FCALL                                                   'bar'
         13        SEND_REF                                                     !0
         14        DO_FCALL                                          0          
   16    15        INIT_FCALL                                                   'var_dump'
         16        SEND_VAR                                                     !0
         17        DO_ICALL                                                     
         18      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/04vX5
function name:  foo
number of ops:  3
compiled vars:  !0 = $object
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        ASSIGN                                                       !0, null
    5     2      > RETURN                                                       null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/04vX5
function name:  bar
number of ops:  3
compiled vars:  !0 = $object
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    8     1        ASSIGN                                                       !0, null
    9     2      > RETURN                                                       null

End of function bar

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
136.19 ms | 2031 KiB | 16 Q