3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = "test"; class Test { function __construct() { return $this->Output(); } function Output() { return $var; } } echo new Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdAD7
function name:  (null)
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test'
   15     1        NEW                                              $2      'Test'
          2        DO_FCALL                                      0          
          3        ECHO                                                     $2
          4      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdAD7
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_METHOD_CALL                                         'Output'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
    8     3*     > RETURN                                                   null

End of function __construct

Function output:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PdAD7
function name:  Output
number of ops:  2
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   !0
   12     1*     > RETURN                                                   null

End of function output

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.5 ms | 1393 KiB | 13 Q