3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objReader = PHPExcel_IOFactory::createReader('Excel2007'); $objReader->setReadDataOnly(true); $objPHPExcel = $objReader->load("prueba.xlsx"); $objWorksheet = $objPHPExcel->setActiveSheetIndex(0); //objWorksheet = $objPHPExcel->getActiveSheet(); //echo '<table border=1>' . "\n"; foreach ($objWorksheet->getRowIterator() as $row) //obtener la fila { //echo '<tr>' . "\n"; $cellIterator = $row->getCellIterator(); // obtener las celdas de la fila $cellIterator->setIterateOnlyExistingCells(false); // solo las celdas existentes. Me devuelve el mismo // valor que le mando como parametro. True por defecto foreach ($cellIterator as $cell) { echo '<td>' . $cell->getValue() . '</td>' . "\n"; } echo '</tr>' . "\n"; } echo '</table>' . "\n"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 37
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 37
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 34
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 34
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 34
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/8usaQ
function name:  (null)
number of ops:  40
compiled vars:  !0 = $objReader, !1 = $objPHPExcel, !2 = $objWorksheet, !3 = $row, !4 = $cellIterator, !5 = $cell
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_STATIC_METHOD_CALL                                  'PHPExcel_IOFactory', 'createReader'
          1        SEND_VAL_EX                                              'Excel2007'
          2        DO_FCALL                                      0  $6      
          3        ASSIGN                                                   !0, $6
    4     4        INIT_METHOD_CALL                                         !0, 'setReadDataOnly'
          5        SEND_VAL_EX                                              <true>
          6        DO_FCALL                                      0          
    5     7        INIT_METHOD_CALL                                         !0, 'load'
          8        SEND_VAL_EX                                              'prueba.xlsx'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !1, $9
    6    11        INIT_METHOD_CALL                                         !1, 'setActiveSheetIndex'
         12        SEND_VAL_EX                                              0
         13        DO_FCALL                                      0  $11     
         14        ASSIGN                                                   !2, $11
   10    15        INIT_METHOD_CALL                                         !2, 'getRowIterator'
         16        DO_FCALL                                      0  $13     
         17      > FE_RESET_R                                       $14     $13, ->37
         18    > > FE_FETCH_R                                               $14, !3, ->37
   13    19    >   INIT_METHOD_CALL                                         !3, 'getCellIterator'
         20        DO_FCALL                                      0  $15     
         21        ASSIGN                                                   !4, $15
   14    22        INIT_METHOD_CALL                                         !4, 'setIterateOnlyExistingCells'
         23        SEND_VAL_EX                                              <false>
         24        DO_FCALL                                      0          
   17    25      > FE_RESET_R                                       $18     !4, ->34
         26    > > FE_FETCH_R                                               $18, !5, ->34
   19    27    >   INIT_METHOD_CALL                                         !5, 'getValue'
         28        DO_FCALL                                      0  $19     
         29        CONCAT                                           ~20     '%3Ctd%3E', $19
         30        CONCAT                                           ~21     ~20, '%3C%2Ftd%3E'
         31        CONCAT                                           ~22     ~21, '%0A'
         32        ECHO                                                     ~22
   17    33      > JMP                                                      ->26
         34    >   FE_FREE                                                  $18
   22    35        ECHO                                                     '%3C%2Ftr%3E%0A'
   10    36      > JMP                                                      ->18
         37    >   FE_FREE                                                  $14
   25    38        ECHO                                                     '%3C%2Ftable%3E%0A'
   27    39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.07 ms | 1399 KiB | 13 Q