3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GetValue($v) { return $v; } class foo { public $bar; } $x = new foo(); var_dump(GetValue($x->bar->baz )); // Notice: Trying to get property of non-object ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mFSoW
function name:  (null)
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    7     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'getvalue'
          5        FETCH_OBJ_R                                      ~4      !0, 'bar'
          6        FETCH_OBJ_R                                      ~5      ~4, 'baz'
          7        SEND_VAL                                                 ~5
          8        DO_FCALL                                      0  $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                                 
    8    11      > RETURN                                                   1

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

End of function getvalue

Class foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.33 ms | 1001 KiB | 15 Q