3v4l.org

run code in 300+ PHP versions simultaneously
<?php function updateObject(object $object): void { $object->newProperty = true; } $obj = new stdClass; var_dump($obj); updateObject($obj); var_dump($obj);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1DXJT
function name:  (null)
number of ops:  13
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    8     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    9     6        INIT_FCALL                                               'updateobject'
          7        SEND_VAR                                                 !0
          8        DO_FCALL                                      0          
   10     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function updateobject

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
277.44 ms | 1012 KiB | 15 Q