3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SampleClass { const MASS_Donkey_Bollocks = 1; public function __construct() { } } class AnotherClass { private $sampleClass; public function __construct() { $this->sampleClass = new SampleClass(); } public function doSomething() { echo 'hello'; var_export($this->sampleClass::MASS_Donkey_Bollocks); echo 'hello2'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n5NoF
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E > > RETURN                                                   1

Class SampleClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n5NoF
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   null

End of function __construct

End of class SampleClass.

Class AnotherClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n5NoF
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'SampleClass'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'sampleClass'
          3        OP_DATA                                                  $1
   22     4      > RETURN                                                   null

End of function __construct

Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n5NoF
function name:  doSomething
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   ECHO                                                     'hello'
   27     1        INIT_FCALL                                               'var_export'
          2        FETCH_OBJ_R                                      ~0      'sampleClass'
          3        FETCH_CLASS                                   0  $1      ~0
          4        FETCH_CLASS_CONSTANT                             ~2      $1, 'MASS_Donkey_Bollocks'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
   28     7        ECHO                                                     'hello2'
   29     8      > RETURN                                                   null

End of function dosomething

End of class AnotherClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.4 ms | 1395 KiB | 15 Q