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;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RrhOj
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'getobject'
          1        DO_FCALL                                      0  $0      
          2        FETCH_OBJ_R                                      ~1      $0, 'string'
          3        ECHO                                                     ~1
          4      > RETURN                                                   1

Function getobject:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RrhOj
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/RrhOj
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:
154.23 ms | 1397 KiB | 14 Q