3v4l.org

run code in 300+ PHP versions simultaneously
<?php class thing{ public function thing(){ $this->scripts = array( "js" => array(), "css" => array() ); } public function grab_scripts(){ foreach($this->scripts['js'] as $path){ echo '<script type="text/javascript" src="' . $path . '></script>'; } foreach($this->scripts['css'] as $path){ echo '<link type="text/css" rel="stylesheet" href="' . $path . '"/>'; } } } $thing = new thing(); $thing->grab_scripts();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MkngA
function name:  (null)
number of ops:  6
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'thing'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'grab_scripts'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class thing:
Function thing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MkngA
function name:  thing
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN_OBJ                                               'scripts'
    9     1        OP_DATA                                                  <array>
   12     2      > RETURN                                                   null

End of function thing

Function grab_scripts:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 8
filename:       /in/MkngA
function name:  grab_scripts
number of ops:  19
compiled vars:  !0 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~1      'scripts'
          1        FETCH_DIM_R                                      ~2      ~1, 'js'
          2      > FE_RESET_R                                       $3      ~2, ->8
          3    > > FE_FETCH_R                                               $3, !0, ->8
   17     4    >   CONCAT                                           ~4      '%3Cscript+type%3D%22text%2Fjavascript%22+src%3D%22', !0
          5        CONCAT                                           ~5      ~4, '%3E%3C%2Fscript%3E'
          6        ECHO                                                     ~5
   16     7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $3
   20     9        FETCH_OBJ_R                                      ~6      'scripts'
         10        FETCH_DIM_R                                      ~7      ~6, 'css'
         11      > FE_RESET_R                                       $8      ~7, ->17
         12    > > FE_FETCH_R                                               $8, !0, ->17
   21    13    >   CONCAT                                           ~9      '%3Clink+type%3D%22text%2Fcss%22+rel%3D%22stylesheet%22+href%3D%22', !0
         14        CONCAT                                           ~10     ~9, '%22%2F%3E'
         15        ECHO                                                     ~10
   20    16      > JMP                                                      ->12
         17    >   FE_FREE                                                  $8
   23    18      > RETURN                                                   null

End of function grab_scripts

End of class thing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.68 ms | 1399 KiB | 13 Q