3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace chaining; class chain { static public function working() {echo "working";} static public function one() {return get_called_class();} static public function two() {return get_called_class();} } ${${${${${chain::one()} = chain::two()}::one()}::two()}::one()}::working();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kTY8g
function name:  (null)
number of ops:  23
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_STATIC_METHOD_CALL                                  'chaining%5Cchain', 'one'
          1        DO_FCALL                                      0  $0      
          2        INIT_STATIC_METHOD_CALL                                  'chaining%5Cchain', 'two'
          3        DO_FCALL                                      0  $2      
          4        FETCH_W                      local               $1      $0
          5        ASSIGN                                           ~3      $1, $2
          6        FETCH_R                      local               ~4      ~3
          7        FETCH_CLASS                                   0  $5      ~4
          8        INIT_STATIC_METHOD_CALL                                  $5, 'one'
          9        DO_FCALL                                      0  $6      
         10        FETCH_R                      local               ~7      $6
         11        FETCH_CLASS                                   0  $8      ~7
         12        INIT_STATIC_METHOD_CALL                                  $8, 'two'
         13        DO_FCALL                                      0  $9      
         14        FETCH_R                      local               ~10     $9
         15        FETCH_CLASS                                   0  $11     ~10
         16        INIT_STATIC_METHOD_CALL                                  $11, 'one'
         17        DO_FCALL                                      0  $12     
         18        FETCH_R                      local               ~13     $12
         19        FETCH_CLASS                                   0  $14     ~13
         20        INIT_STATIC_METHOD_CALL                                  $14, 'working'
         21        DO_FCALL                                      0          
         22      > RETURN                                                   1

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

End of function working

Function one:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kTY8g
function name:  one
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_NS_FCALL_BY_NAME                                    'chaining%5Cget_called_class'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function one

Function two:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kTY8g
function name:  two
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_NS_FCALL_BY_NAME                                    'chaining%5Cget_called_class'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function two

End of class chaining\chain.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.13 ms | 1007 KiB | 14 Q