3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $commands = ['foo', 'bar']; public function commands($command) { var_dump($command); } public function boot() { foreach ($this->commands as $command) { $this->commands($command); } } } (new Test())->boot();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dip65
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $0      'Test'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'boot'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class Test:
Function commands:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dip65
function name:  commands
number of ops:  5
compiled vars:  !0 = $command
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   10     4      > RETURN                                                   null

End of function commands

Function boot:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/dip65
function name:  boot
number of ops:  9
compiled vars:  !0 = $command
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~1      'commands'
          1      > FE_RESET_R                                       $2      ~1, ->7
          2    > > FE_FETCH_R                                               $2, !0, ->7
   15     3    >   INIT_METHOD_CALL                                         'commands'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   14     6      > JMP                                                      ->2
          7    >   FE_FREE                                                  $2
   17     8      > RETURN                                                   null

End of function boot

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.98 ms | 1400 KiB | 15 Q