3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'baz'; } function get_foo() { return new Foo(); } echo get_foo()->bar; // baz
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cmivb
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'get_foo'
          1        DO_FCALL                                      0  $0      
          2        FETCH_OBJ_R                                      ~1      $0, 'bar'
          3        ECHO                                                     ~1
          4      > RETURN                                                   1

Function get_foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cmivb
function name:  get_foo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   10     3*     > RETURN                                                   null

End of function get_foo

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.39 ms | 1396 KiB | 14 Q