3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class thing{ public function __construct(){ $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/iueVv
function name:  (null)
number of ops:  7
compiled vars:  !0 = $thing
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  27     1        NEW                                              $2      :-5
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $2
  28     4        INIT_METHOD_CALL                                         !0, 'grab_scripts'
         5        DO_FCALL                                      0          
         6      > RETURN                                                   1

Class thing:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iueVv
function name:  __construct
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 __construct

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/iueVv
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
         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
        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 7.3.0