3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Manager { public $content_storage=''; public function __toString() { return $this->content_storage; } } abstract class EntryClass { public static function Launch() { return new FluentInterface; } } class FluentInterface extends Manager { public function __construct() { /** * Что-нибудь инициализируем */ } public static function _GetObject($n,array $params) { $this->content_storage.=$n.'<br>'.PHP_EOL; return $this; } } echo $FI=EntryClass::Launch() ->First() ->Second() ->Third(); /* Выведет First Second Third */ ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZMCNZ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $FI
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'manager'
   22     1        DECLARE_CLASS                                            'fluentinterface', 'manager'
   38     2        INIT_STATIC_METHOD_CALL                                  'EntryClass', 'Launch'
          3        DO_FCALL                                      0  $1      
   39     4        INIT_METHOD_CALL                                         $1, 'First'
          5        DO_FCALL                                      0  $2      
   40     6        INIT_METHOD_CALL                                         $2, 'Second'
          7        DO_FCALL                                      0  $3      
   41     8        INIT_METHOD_CALL                                         $3, 'Third'
          9        DO_FCALL                                      0  $4      
   38    10        ASSIGN                                           ~5      !0, $4
         11        ECHO                                                     ~5
   48    12      > RETURN                                                   1

Class Manager:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZMCNZ
function name:  __toString
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      'content_storage'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
    9     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function __tostring

End of class Manager.

Class EntryClass:
Function launch:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZMCNZ
function name:  Launch
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $0      'FluentInterface'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   19     3*     > RETURN                                                   null

End of function launch

End of class EntryClass.

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

End of function __construct

Function _getobject:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZMCNZ
function name:  _GetObject
number of ops:  10
compiled vars:  !0 = $n, !1 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   33     2        FETCH_THIS                                       $2      
          3        CONCAT                                           ~4      !0, '%3Cbr%3E'
          4        CONCAT                                           ~5      ~4, '%0A'
          5        ASSIGN_OBJ_OP                                 8          $2, 'content_storage'
          6        OP_DATA                                                  ~5
   34     7        FETCH_THIS                                       ~6      
          8      > RETURN                                                   ~6
   35     9*     > RETURN                                                   null

End of function _getobject

End of class FluentInterface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.56 ms | 1399 KiB | 13 Q