3v4l.org

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

End of function output

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
262.81 ms | 1393 KiB | 14 Q