3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('APACHE_MIME_TYPES_URL','http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types'); function generateUpToDateMimeArray($url){ $s=array(); foreach(@explode("\n",@file_get_contents($url))as $x) if(isset($x[0])&&$x[0]!=='#'&&preg_match_all('#([^\s]+)#',$x,$out)&&isset($out[1])&&($c=count($out[1]))>1) for($i=1;$i<$c;$i++) $s[]='&nbsp;&nbsp;&nbsp;\''.$out[1][$i].'\' => \''.$out[1][0].'\''; return @sort($s)?'$mime_types = array(<br />'.implode($s,',<br />').'<br />);':false; } echo generateUpToDateMimeArray(APACHE_MIME_TYPES_URL);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OpXlC
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'APACHE_MIME_TYPES_URL'
          2        SEND_VAL                                                 'http%3A%2F%2Fsvn.apache.org%2Frepos%2Fasf%2Fhttpd%2Fhttpd%2Ftrunk%2Fdocs%2Fconf%2Fmime.types'
          3        DO_ICALL                                                 
   14     4        INIT_FCALL                                               'generateuptodatemimearray'
          5        FETCH_CONSTANT                                   ~1      'APACHE_MIME_TYPES_URL'
          6        SEND_VAL                                                 ~1
          7        DO_FCALL                                      0  $2      
          8        ECHO                                                     $2
          9      > RETURN                                                   1

Function generateuptodatemimearray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 53
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 53
Branch analysis from position: 15
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 27
Branch analysis from position: 21
2 jumps found. (Code = 46) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
2 jumps found. (Code = 46) Position 1 = 31, Position 2 = 36
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 52
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 39
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 39
Branch analysis from position: 52
Branch analysis from position: 39
Branch analysis from position: 52
Branch analysis from position: 36
Branch analysis from position: 30
Branch analysis from position: 27
Branch analysis from position: 20
Branch analysis from position: 53
2 jumps found. (Code = 43) Position 1 = 60, Position 2 = 68
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 69
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 68
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
filename:       /in/OpXlC
function name:  generateUpToDateMimeArray
number of ops:  71
compiled vars:  !0 = $url, !1 = $s, !2 = $x, !3 = $out, !4 = $c, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, <array>
    7     2        BEGIN_SILENCE                                    ~7      
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%0A'
          5        BEGIN_SILENCE                                    ~8      
          6        INIT_FCALL                                               'file_get_contents'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $9      
          9        END_SILENCE                                              ~8
         10        SEND_VAR                                                 $9
         11        DO_ICALL                                         $10     
         12        END_SILENCE                                              ~7
         13      > FE_RESET_R                                       $11     $10, ->53
         14    > > FE_FETCH_R                                               $11, !2, ->53
    8    15    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~12     !2, 0
         16      > JMPZ_EX                                          ~12     ~12, ->20
         17    >   FETCH_DIM_R                                      ~13     !2, 0
         18        IS_NOT_IDENTICAL                                 ~14     ~13, '%23'
         19        BOOL                                             ~12     ~14
         20    > > JMPZ_EX                                          ~12     ~12, ->27
         21    >   INIT_FCALL                                               'preg_match_all'
         22        SEND_VAL                                                 '%23%28%5B%5E%5Cs%5D%2B%29%23'
         23        SEND_VAR                                                 !2
         24        SEND_REF                                                 !3
         25        DO_ICALL                                         $15     
         26        BOOL                                             ~12     $15
         27    > > JMPZ_EX                                          ~12     ~12, ->30
         28    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~16     !3, 1
         29        BOOL                                             ~12     ~16
         30    > > JMPZ_EX                                          ~12     ~12, ->36
         31    >   FETCH_DIM_R                                      ~17     !3, 1
         32        COUNT                                            ~18     ~17
         33        ASSIGN                                           ~19     !4, ~18
         34        IS_SMALLER                                       ~20     1, ~19
         35        BOOL                                             ~12     ~20
         36    > > JMPZ                                                     ~12, ->52
    9    37    >   ASSIGN                                                   !5, 1
         38      > JMP                                                      ->50
   10    39    >   FETCH_DIM_R                                      ~23     !3, 1
         40        FETCH_DIM_R                                      ~24     ~23, !5
         41        CONCAT                                           ~25     '%26nbsp%3B%26nbsp%3B%26nbsp%3B%27', ~24
         42        CONCAT                                           ~26     ~25, '%27+%3D%3E+%27'
         43        FETCH_DIM_R                                      ~27     !3, 1
         44        FETCH_DIM_R                                      ~28     ~27, 0
         45        CONCAT                                           ~29     ~26, ~28
         46        CONCAT                                           ~30     ~29, '%27'
         47        ASSIGN_DIM                                               !1
         48        OP_DATA                                                  ~30
    9    49        PRE_INC                                                  !5
         50    >   IS_SMALLER                                               !5, !4
         51      > JMPNZ                                                    ~32, ->39
    7    52    > > JMP                                                      ->14
         53    >   FE_FREE                                                  $11
   11    54        BEGIN_SILENCE                                    ~33     
         55        INIT_FCALL                                               'sort'
         56        SEND_REF                                                 !1
         57        DO_ICALL                                         $34     
         58        END_SILENCE                                              ~33
         59      > JMPZ                                                     $34, ->68
         60    >   INIT_FCALL                                               'implode'
         61        SEND_VAR                                                 !1
         62        SEND_VAL                                                 '%2C%3Cbr+%2F%3E'
         63        DO_ICALL                                         $35     
         64        CONCAT                                           ~36     '%24mime_types+%3D+array%28%3Cbr+%2F%3E', $35
         65        CONCAT                                           ~37     ~36, '%3Cbr+%2F%3E%29%3B'
         66        QM_ASSIGN                                        ~38     ~37
         67      > JMP                                                      ->69
         68    >   QM_ASSIGN                                        ~38     <false>
         69    > > RETURN                                                   ~38
   12    70*     > RETURN                                                   null

End of function generateuptodatemimearray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.45 ms | 1407 KiB | 26 Q