3v4l.org

run code in 500+ PHP versions simultaneously
<?php $expected = [ ['john', 'doe', 'john.doe@example.com', '0123456789'], ['jane', 'doe', 'jane.doe@example.com'], ]; $tmp = new SplTempFileObject(); foreach ($expected as $row) { $tmp->fputcsv($row); } $tmp->setFlags(0); $tmp->seek(23); var_dump($tmp->current()); $tmp->setFlags(SplFileObject::READ_CSV | SplFileObject::SKIP_EMPTY); $tmp->seek(23); var_dump($tmp->current());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/pl0Kg
function name:  (null)
number of ops:  34
compiled vars:  !0 = $expected, !1 = $tmp, !2 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    8     1        NEW                                                  $4      'SplTempFileObject'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !1, $4
    9     4      > FE_RESET_R                                           $7      !0, ->10
          5    > > FE_FETCH_R                                                   $7, !2, ->10
   10     6    >   INIT_METHOD_CALL                                             !1, 'fputcsv'
          7        SEND_VAR_EX                                                  !2
          8        DO_FCALL                                          0          
    9     9      > JMP                                                          ->5
         10    >   FE_FREE                                                      $7
   12    11        INIT_METHOD_CALL                                             !1, 'setFlags'
         12        SEND_VAL_EX                                                  0
         13        DO_FCALL                                          0          
   13    14        INIT_METHOD_CALL                                             !1, 'seek'
         15        SEND_VAL_EX                                                  23
         16        DO_FCALL                                          0          
   14    17        INIT_FCALL                                                   'var_dump'
         18        INIT_METHOD_CALL                                             !1, 'current'
         19        DO_FCALL                                          0  $11     
         20        SEND_VAR                                                     $11
         21        DO_ICALL                                                     
   15    22        INIT_METHOD_CALL                                             !1, 'setFlags'
         23        SEND_VAL_EX                                                  12
         24        DO_FCALL                                          0          
   16    25        INIT_METHOD_CALL                                             !1, 'seek'
         26        SEND_VAL_EX                                                  23
         27        DO_FCALL                                          0          
   17    28        INIT_FCALL                                                   'var_dump'
         29        INIT_METHOD_CALL                                             !1, 'current'
         30        DO_FCALL                                          0  $15     
         31        SEND_VAR                                                     $15
         32        DO_ICALL                                                     
         33      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.96 ms | 2599 KiB | 14 Q