3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooClass { public function __construct() { $this->string = 'this is some string'; } } function getObject() { return new FooClass; } echo getObject()->string; $something = getObject(); echo $something->string;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oMXXi
function name:  (null)
number of ops:  10
compiled vars:  !0 = $something
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'getobject'
          1        DO_FCALL                                      0  $1      
          2        FETCH_OBJ_R                                      ~2      $1, 'string'
          3        ECHO                                                     ~2
   18     4        INIT_FCALL                                               'getobject'
          5        DO_FCALL                                      0  $3      
          6        ASSIGN                                                   !0, $3
   20     7        FETCH_OBJ_R                                      ~5      !0, 'string'
          8        ECHO                                                     ~5
          9      > RETURN                                                   1

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

End of function getobject

Class FooClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oMXXi
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ                                               'string'
          1        OP_DATA                                                  'this+is+some+string'
    8     2      > RETURN                                                   null

End of function __construct

End of class FooClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.6 ms | 1402 KiB | 15 Q