3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Manager { } abstract class EntryClass { public static function Launch() { return new FluentInterface; } } class FluentInterface extends Manager { public function __construct() { /** * Что-нибудь инициализируем */ } public $content_storage=''; public function __toString() { return $this->content_storage; } 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/FsBQI
function name:  (null)
number of ops:  12
compiled vars:  !0 = $FI
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'fluentinterface', 'manager'
   39     1        INIT_STATIC_METHOD_CALL                                  'EntryClass', 'Launch'
          2        DO_FCALL                                      0  $1      
   40     3        INIT_METHOD_CALL                                         $1, 'First'
          4        DO_FCALL                                      0  $2      
   41     5        INIT_METHOD_CALL                                         $2, 'Second'
          6        DO_FCALL                                      0  $3      
   42     7        INIT_METHOD_CALL                                         $3, 'Third'
          8        DO_FCALL                                      0  $4      
   39     9        ASSIGN                                           ~5      !0, $4
         10        ECHO                                                     ~5
   49    11      > RETURN                                                   1

Class Manager: [no user functions]
Class EntryClass:
Function launch:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FsBQI
function name:  Launch
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $0      'FluentInterface'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   12     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/FsBQI
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E > > RETURN                                                   null

End of function __construct

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

End of function __tostring

Function _getobject:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FsBQI
function name:  _GetObject
number of ops:  10
compiled vars:  !0 = $n, !1 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   34     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
   35     7        FETCH_THIS                                       ~6      
          8      > RETURN                                                   ~6
   36     9*     > RETURN                                                   null

End of function _getobject

End of class FluentInterface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.68 ms | 1399 KiB | 13 Q