3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrCSV = array(); //if (($handle = fopen("http://ichart.finance.yahoo.com/table.csv?s=AAPL&d=7&e=7&f=2012&g=d&a=8&b=7&c=1984&ignore=.csv", "r")) !==FALSE) if (($handle = fopen("http://ichart.finance.yahoo.com/table.csv?s=AAPL", "r")) !==FALSE) { $key = 0; while (($data = fgetcsv($handle, 0, ",")) !==FALSE) { //echo '<br/>======<br/>'; //print_r($data); $c = count($data); If ($key != 0) { $arrCSV[$key-1][0] = strtotime($data[0])*1000; //Time $arrCSV[$key-1][1] = floatval($data[1]); //Open $arrCSV[$key-1][2] = floatval($data[2]); //High $arrCSV[$key-1][3] = floatval($data[3]); //Low $arrCSV[$key-1][4] = floatval($data[6]); //Adj Close $arrCSV[$key-1][5] = floatval($data[5]); //Volume } //echo '<Br/>'; //print_r($arrCSV[$key-1]); $key++; } // end while $keymax = $key; fclose($handle); } // end if echo json_encode($arrCSV); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 66
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 10
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 53
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 10
Branch analysis from position: 62
Branch analysis from position: 10
Branch analysis from position: 53
Branch analysis from position: 66
filename:       /in/DQj2W
function name:  (null)
number of ops:  71
compiled vars:  !0 = $arrCSV, !1 = $handle, !2 = $key, !3 = $c, !4 = $data, !5 = $keymax
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'fopen'
          2        SEND_VAL                                                 'http%3A%2F%2Fichart.finance.yahoo.com%2Ftable.csv%3Fs%3DAAPL'
          3        SEND_VAL                                                 'r'
          4        DO_ICALL                                         $7      
          5        ASSIGN                                           ~8      !1, $7
          6        TYPE_CHECK                                  1018          ~8
          7      > JMPZ                                                     ~9, ->66
    7     8    >   ASSIGN                                                   !2, 0
    9     9      > JMP                                                      ->54
   13    10    >   COUNT                                            ~11     !4
         11        ASSIGN                                                   !3, ~11
   15    12        IS_NOT_EQUAL                                             !2, 0
         13      > JMPZ                                                     ~13, ->53
   16    14    >   SUB                                              ~14     !2, 1
         15        INIT_FCALL                                               'strtotime'
         16        FETCH_DIM_R                                      ~17     !4, 0
         17        SEND_VAL                                                 ~17
         18        DO_ICALL                                         $18     
         19        MUL                                              ~19     $18, 1000
         20        FETCH_DIM_W                                      $15     !0, ~14
         21        ASSIGN_DIM                                               $15, 0
         22        OP_DATA                                                  ~19
   17    23        SUB                                              ~20     !2, 1
         24        FETCH_DIM_R                                      ~23     !4, 1
         25        CAST                                          5  ~24     ~23
         26        FETCH_DIM_W                                      $21     !0, ~20
         27        ASSIGN_DIM                                               $21, 1
         28        OP_DATA                                                  ~24
   18    29        SUB                                              ~25     !2, 1
         30        FETCH_DIM_R                                      ~28     !4, 2
         31        CAST                                          5  ~29     ~28
         32        FETCH_DIM_W                                      $26     !0, ~25
         33        ASSIGN_DIM                                               $26, 2
         34        OP_DATA                                                  ~29
   19    35        SUB                                              ~30     !2, 1
         36        FETCH_DIM_R                                      ~33     !4, 3
         37        CAST                                          5  ~34     ~33
         38        FETCH_DIM_W                                      $31     !0, ~30
         39        ASSIGN_DIM                                               $31, 3
         40        OP_DATA                                                  ~34
   20    41        SUB                                              ~35     !2, 1
         42        FETCH_DIM_R                                      ~38     !4, 6
         43        CAST                                          5  ~39     ~38
         44        FETCH_DIM_W                                      $36     !0, ~35
         45        ASSIGN_DIM                                               $36, 4
         46        OP_DATA                                                  ~39
   21    47        SUB                                              ~40     !2, 1
         48        FETCH_DIM_R                                      ~43     !4, 5
         49        CAST                                          5  ~44     ~43
         50        FETCH_DIM_W                                      $41     !0, ~40
         51        ASSIGN_DIM                                               $41, 5
         52        OP_DATA                                                  ~44
   26    53    >   PRE_INC                                                  !2
    9    54    >   INIT_FCALL                                               'fgetcsv'
         55        SEND_VAR                                                 !1
         56        SEND_VAL                                                 0
         57        SEND_VAL                                                 '%2C'
         58        DO_ICALL                                         $46     
         59        ASSIGN                                           ~47     !4, $46
         60        TYPE_CHECK                                  1018          ~47
         61      > JMPNZ                                                    ~48, ->10
   29    62    >   ASSIGN                                                   !5, !2
   31    63        INIT_FCALL                                               'fclose'
         64        SEND_VAR                                                 !1
         65        DO_ICALL                                                 
   34    66    >   INIT_FCALL                                               'json_encode'
         67        SEND_VAR                                                 !0
         68        DO_ICALL                                         $51     
         69        ECHO                                                     $51
   37    70      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.45 ms | 1400 KiB | 23 Q