3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Test { function printMe(); } trait T { public function justDoIt() { echo "Just Do IT!" . PHP_EOL; return $this; } } (new class(7) implements Test { private $value; use T; public function __construct(int $value) { $this->value = $value; } public function printMe() { echo $this->value . PHP_EOL; return $this; } })->printMe()->justDoIt();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I87FU
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_ANON_CLASS                               <ptr>   
          1        NEW                                              $1      $0
          2        SEND_VAL_EX                                              7
          3        DO_FCALL                                      0          
   27     4        INIT_METHOD_CALL                                         $1, 'printMe'
          5        DO_FCALL                                      0  $3      
          6        INIT_METHOD_CALL                                         $3, 'justDoIt'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function printme

End of class Test.

Class T:
Function justdoit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I87FU
function name:  justDoIt
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'Just+Do+IT%21%0A'
    9     1        FETCH_THIS                                       ~0      
          2      > RETURN                                                   ~0
   10     3*     > RETURN                                                   null

End of function justdoit

End of class T.

Class Test@anonymous:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I87FU
function name:  __construct
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1        ASSIGN_OBJ                                               'value'
          2        OP_DATA                                                  !0
   21     3      > RETURN                                                   null

End of function __construct

Function printme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I87FU
function name:  printMe
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
   25     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   26     5*     > RETURN                                                   null

End of function printme

End of class Test@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.73 ms | 1395 KiB | 13 Q