3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = (object) array( "\0*\0bar" => 1, "\0Foo\0baz" => 2, ); class Foo { public function echoBaz($obj) { echo $obj->baz; } } (new Foo())->echoBaz($obj); echo $obj->baz;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Psbsi
function name:  (null)
number of ops:  10
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   CAST                                          8  ~1      <array>
    3     1        ASSIGN                                                   !0, ~1
   17     2        NEW                                              $3      'Foo'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $3, 'echoBaz'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   18     7        FETCH_OBJ_R                                      ~6      !0, 'baz'
          8        ECHO                                                     ~6
          9      > RETURN                                                   1

Class Foo:
Function echobaz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Psbsi
function name:  echoBaz
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        FETCH_OBJ_R                                      ~1      !0, 'baz'
          2        ECHO                                                     ~1
   14     3      > RETURN                                                   null

End of function echobaz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.85 ms | 1393 KiB | 13 Q