3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace KHerGe\File; use Exception; use KHerGe\File\Exception\FileException; use SplFileObject; /** * Manages errors for read and write operations. * * @author Kevin Herrera <kevin@herrera.io> */ class File extends SplFileObject { /** * @override */ public function __construct( $filename, $open_mode = 'r', $use_include_path = false, $context = null ) { try { if (null === $context) { parent::__construct( $filename, $open_mode, $use_include_path ); } else { parent::__construct( $filename, $open_mode, $use_include_path, $context ); } } catch (Exception $exception) { throw FileException::openFailed($filename, $exception); } } /** * Creates a new file object. * * @param string $filename The path to the file. * @param string $open_mode The file open mode. * @param boolean $use_include_path Use the include path? * @param resource $context A valid context resource. * * @return $this The new file object. */ public static function create( $filename, $open_mode = 'r', $use_include_path = false, $context = null ) { return new static($filename, $open_mode, $use_include_path, $context); } /** * Creates a new temporary file and returns its file object. * * @param string $prefix The prefix for the name of the temporary file. (default: php-) * @param string $mode The file open mode. (default: w+) * * @return $this The new file object. * * @throws FileException If the temporary file could not be created. */ public static function createTemp($prefix = 'php-', $mode = 'w+') { return new static(static::createTempPath($prefix), $mode); } /** * Creates a new, named temporary file and returns its file object. * * @param string $name The name of the temporary file. * @param string $mode The file open mode. (default: w+) * * @return $this The new file object. */ public static function createTempNamed($name, $mode = 'w+') { return new static(static::createTempPathNamed($name), $mode); } /** * Creates a new temporary file and returns its path. * * @param string $prefix The prefix for the name of the temporary file. * * @return string The path to the temporary file. * * @throws FileException If the temporary file could not be created. */ public static function createTempPath($prefix = 'php-') { $temp = tempnam(sys_get_temp_dir(), $prefix); if (false === $temp) { // @codeCoverageIgnoreStart throw new FileException( 'A new temporary file could not be created.' ); } // @codeCoverageIgnoreEnd return $temp; } /** * Creates a new, named temporary file and returns its path. * * @param string $name The name for the temporary file. * * @return string The path to the temporary file. * * @throws FileException If the temporary file could not be created. */ public static function createTempPathNamed($name) { $dir = static::createTempPath(); if (!unlink($dir)) { // @codeCoverageIgnoreStart throw new FileException( 'The temporary file could not be deleted.' ); } // @codeCoverageIgnoreEnd if (!mkdir($dir)) { // @codeCoverageIgnoreStart throw new FileException( 'A new temporary directory could not be created.' ); } // @codeCoverageIgnoreEnd $path = $dir . DIRECTORY_SEPARATOR . $name; if (!touch($path)) { // @codeCoverageIgnoreStart throw new FileException( 'A new temporary file could not be created.' ); } // @codeCoverageIgnoreEnd return $path; } /** * @override */ public function fflush() { if (!parent::fflush()) { throw FileException::flushFailed($this); } return true; } /** * @override */ public function fgetc() { if (false === ($c = parent::fgetc())) { throw FileException::reachedEOF($this); } return $c; } /** * @override */ public function fgetcsv( $delimiter = ',', $enclosure = '"', $escape = '\\' ) { if (!is_array($row = parent::fgetcsv($delimiter, $enclosure, $escape))) { throw FileException::readFailed($this); } return $row; } /** * @override */ public function fgets() { try { if (false === ($string = parent::fgets())) { throw FileException::readFailed($this); } } catch (Exception $exception) { throw FileException::readFailed($this, $exception); } return $string; } /** * @override */ public function fgetss($allowable_tags = null) { if (false === ($string = parent::fgetss($allowable_tags))) { throw FileException::readFailed($this); } return $string; } /** * @override */ public function flock($operation, &$wouldblock = null) { if (!parent::flock($operation, $wouldblock)) { throw FileException::lockFailed($this); } return true; } /** * @override */ public function fputcsv( $fields, $delimiter = ',', $enclosure = '"', $escape = '\\' ) { if (false === ($length = parent::fputcsv($fields, $delimiter, $enclosure, $escape))) { throw FileException::writeFailed($this); } return $length; } /** * @override */ public function fseek($offset, $whence = SEEK_SET) { if (-1 === parent::fseek($offset, $whence)) { throw FileException::seekFailed($this); } return 0; } /** * @override */ public function ftell() { if (false === ($position = parent::ftell())) { throw FileException::tellFailed($this); } return $position; } /** * @override */ public function ftruncate($size) { if (!parent::ftruncate($size)) { throw FileException::truncateFailed($this); } return true; } /** * @override */ public function fwrite($str, $length = null) { if (null === $length) { $length = strlen($str); } if (null === ($bytes = parent::fwrite($str, $length))) { throw FileException::writeFailed($this); } return $bytes; } /** * @override */ public function seek($line_pos) { try { parent::seek($line_pos); } catch (Exception $exception) { throw FileException::seekFailed($this, $exception); } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  316     0  E > > RETURN                                                   1

Class KHerGe\File\File:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Found catch point at position: 19
Branch analysis from position: 19
2 jumps found. (Code = 107) Position 1 = 20, Position 2 = -2
Branch analysis from position: 20
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/j3d0G
function name:  __construct
number of ops:  26
compiled vars:  !0 = $filename, !1 = $open_mode, !2 = $use_include_path, !3 = $context, !4 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'r'
          2        RECV_INIT                                        !2      <false>
          3        RECV_INIT                                        !3      null
   26     4        TYPE_CHECK                                    2          !3
          5      > JMPZ                                                     ~5, ->12
   27     6    >   INIT_STATIC_METHOD_CALL                                  
   28     7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0          
         11      > JMP                                                      ->18
   33    12    >   INIT_STATIC_METHOD_CALL                                  
   34    13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !1
         15        SEND_VAR_EX                                              !2
         16        SEND_VAR_EX                                              !3
         17        DO_FCALL                                      0          
         18    > > JMP                                                      ->25
   40    19  E > > CATCH                                       last         'Exception'
   41    20    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'openFailed'
         21        SEND_VAR_EX                                              !0
         22        SEND_VAR_EX                                              !4
         23        DO_FCALL                                      0  $8      
         24      > THROW                                         0          $8
   43    25    > > RETURN                                                   null

End of function __construct

Function create:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  create
number of ops:  12
compiled vars:  !0 = $filename, !1 = $open_mode, !2 = $use_include_path, !3 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   55     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'r'
          2        RECV_INIT                                        !2      <false>
          3        RECV_INIT                                        !3      null
   61     4        NEW                          static              $4      
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !2
          8        SEND_VAR_EX                                              !3
          9        DO_FCALL                                      0          
         10      > RETURN                                                   $4
   62    11*     > RETURN                                                   null

End of function create

Function createtemp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  createTemp
number of ops:  11
compiled vars:  !0 = $prefix, !1 = $mode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   74     0  E >   RECV_INIT                                        !0      'php-'
          1        RECV_INIT                                        !1      'w%2B'
   76     2        NEW                          static              $2      
          3        INIT_STATIC_METHOD_CALL                                  'createTempPath'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR_NO_REF_EX                                       $3
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9      > RETURN                                                   $2
   77    10*     > RETURN                                                   null

End of function createtemp

Function createtempnamed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  createTempNamed
number of ops:  11
compiled vars:  !0 = $name, !1 = $mode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   87     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'w%2B'
   89     2        NEW                          static              $2      
          3        INIT_STATIC_METHOD_CALL                                  'createTempPathNamed'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $3      
          6        SEND_VAR_NO_REF_EX                                       $3
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9      > RETURN                                                   $2
   90    10*     > RETURN                                                   null

End of function createtempnamed

Function createtemppath:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  createTempPath
number of ops:  16
compiled vars:  !0 = $prefix, !1 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  101     0  E >   RECV_INIT                                        !0      'php-'
  103     1        INIT_NS_FCALL_BY_NAME                                    'KHerGe%5CFile%5Ctempnam'
          2        INIT_NS_FCALL_BY_NAME                                    'KHerGe%5CFile%5Csys_get_temp_dir'
          3        DO_FCALL                                      0  $2      
          4        SEND_VAR_NO_REF_EX                                       $2
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $3      
          7        ASSIGN                                                   !1, $3
  105     8        TYPE_CHECK                                    4          !1
          9      > JMPZ                                                     ~5, ->14
  107    10    >   NEW                                              $6      'KHerGe%5CFile%5CException%5CFileException'
  108    11        SEND_VAL_EX                                              'A+new+temporary+file+could+not+be+created.'
         12        DO_FCALL                                      0          
         13      > THROW                                         0          $6
  113    14    > > RETURN                                                   !1
  114    15*     > RETURN                                                   null

End of function createtemppath

Function createtemppathnamed:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  createTempPathNamed
number of ops:  37
compiled vars:  !0 = $name, !1 = $dir, !2 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  125     0  E >   RECV                                             !0      
  127     1        INIT_STATIC_METHOD_CALL                                  'createTempPath'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !1, $3
  129     4        INIT_NS_FCALL_BY_NAME                                    'KHerGe%5CFile%5Cunlink'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $5      
          7        BOOL_NOT                                         ~6      $5
          8      > JMPZ                                                     ~6, ->13
  131     9    >   NEW                                              $7      'KHerGe%5CFile%5CException%5CFileException'
  132    10        SEND_VAL_EX                                              'The+temporary+file+could+not+be+deleted.'
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $7
  137    13    >   INIT_NS_FCALL_BY_NAME                                    'KHerGe%5CFile%5Cmkdir'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $9      
         16        BOOL_NOT                                         ~10     $9
         17      > JMPZ                                                     ~10, ->22
  139    18    >   NEW                                              $11     'KHerGe%5CFile%5CException%5CFileException'
  140    19        SEND_VAL_EX                                              'A+new+temporary+directory+could+not+be+created.'
         20        DO_FCALL                                      0          
         21      > THROW                                         0          $11
  145    22    >   FETCH_CONSTANT                                   ~13     'KHerGe%5CFile%5CDIRECTORY_SEPARATOR'
         23        CONCAT                                           ~14     !1, ~13
         24        CONCAT                                           ~15     ~14, !0
         25        ASSIGN                                                   !2, ~15
  147    26        INIT_NS_FCALL_BY_NAME                                    'KHerGe%5CFile%5Ctouch'
         27        SEND_VAR_EX                                              !2
         28        DO_FCALL                                      0  $17     
         29        BOOL_NOT                                         ~18     $17
         30      > JMPZ                                                     ~18, ->35
  149    31    >   NEW                                              $19     'KHerGe%5CFile%5CException%5CFileException'
  150    32        SEND_VAL_EX                                              'A+new+temporary+file+could+not+be+created.'
         33        DO_FCALL                                      0          
         34      > THROW                                         0          $19
  155    35    > > RETURN                                                   !2
  156    36*     > RETURN                                                   null

End of function createtemppathnamed

Function fflush:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  fflush
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  163     0  E >   INIT_STATIC_METHOD_CALL                                  'fflush'
          1        DO_FCALL                                      0  $0      
          2        BOOL_NOT                                         ~1      $0
          3      > JMPZ                                                     ~1, ->9
  164     4    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'flushFailed'
          5        FETCH_THIS                                       $2      
          6        SEND_VAR_EX                                              $2
          7        DO_FCALL                                      0  $3      
          8      > THROW                                         0          $3
  167     9    > > RETURN                                                   <true>
  168    10*     > RETURN                                                   null

End of function fflush

Function fgetc:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  fgetc
number of ops:  12
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  175     0  E >   INIT_STATIC_METHOD_CALL                                  'fgetc'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                           ~2      !0, $1
          3        TYPE_CHECK                                    4          ~2
          4      > JMPZ                                                     ~3, ->10
  176     5    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'reachedEOF'
          6        FETCH_THIS                                       $4      
          7        SEND_VAR_EX                                              $4
          8        DO_FCALL                                      0  $5      
          9      > THROW                                         0          $5
  179    10    > > RETURN                                                   !0
  180    11*     > RETURN                                                   null

End of function fgetc

Function fgetcsv:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  fgetcsv
number of ops:  21
compiled vars:  !0 = $delimiter, !1 = $enclosure, !2 = $escape, !3 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  185     0  E >   RECV_INIT                                        !0      '%2C'
          1        RECV_INIT                                        !1      '%22'
          2        RECV_INIT                                        !2      '%5C'
  190     3        INIT_NS_FCALL_BY_NAME                                    'KHerGe%5CFile%5Cis_array'
          4        INIT_STATIC_METHOD_CALL                                  'fgetcsv'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0  $4      
          9        ASSIGN                                           ~5      !3, $4
         10        SEND_VAL_EX                                              ~5
         11        DO_FCALL                                      0  $6      
         12        BOOL_NOT                                         ~7      $6
         13      > JMPZ                                                     ~7, ->19
  191    14    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'readFailed'
         15        FETCH_THIS                                       $8      
         16        SEND_VAR_EX                                              $8
         17        DO_FCALL                                      0  $9      
         18      > THROW                                         0          $9
  194    19    > > RETURN                                                   !3
  195    20*     > RETURN                                                   null

End of function fgetcsv

Function fgets:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 11
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/j3d0G
function name:  fgets
number of ops:  20
compiled vars:  !0 = $string, !1 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  203     0  E >   INIT_STATIC_METHOD_CALL                                  'fgets'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                           ~3      !0, $2
          3        TYPE_CHECK                                    4          ~3
          4      > JMPZ                                                     ~4, ->10
  204     5    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'readFailed'
          6        FETCH_THIS                                       $5      
          7        SEND_VAR_EX                                              $5
          8        DO_FCALL                                      0  $6      
          9      > THROW                                         0          $6
         10    > > JMP                                                      ->18
  206    11  E > > CATCH                                       last         'Exception'
  207    12    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'readFailed'
         13        FETCH_THIS                                       $7      
         14        SEND_VAR_EX                                              $7
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0  $8      
         17      > THROW                                         0          $8
  210    18    > > RETURN                                                   !0
  211    19*     > RETURN                                                   null

End of function fgets

Function fgetss:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  fgetss
number of ops:  14
compiled vars:  !0 = $allowable_tags, !1 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  216     0  E >   RECV_INIT                                        !0      null
  218     1        INIT_STATIC_METHOD_CALL                                  'fgetss'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                           ~3      !1, $2
          5        TYPE_CHECK                                    4          ~3
          6      > JMPZ                                                     ~4, ->12
  219     7    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'readFailed'
          8        FETCH_THIS                                       $5      
          9        SEND_VAR_EX                                              $5
         10        DO_FCALL                                      0  $6      
         11      > THROW                                         0          $6
  222    12    > > RETURN                                                   !1
  223    13*     > RETURN                                                   null

End of function fgetss

Function flock:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  flock
number of ops:  15
compiled vars:  !0 = $operation, !1 = $wouldblock
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  228     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
  230     2        INIT_STATIC_METHOD_CALL                                  'flock'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $2      
          6        BOOL_NOT                                         ~3      $2
          7      > JMPZ                                                     ~3, ->13
  231     8    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'lockFailed'
          9        FETCH_THIS                                       $4      
         10        SEND_VAR_EX                                              $4
         11        DO_FCALL                                      0  $5      
         12      > THROW                                         0          $5
  234    13    > > RETURN                                                   <true>
  235    14*     > RETURN                                                   null

End of function flock

Function fputcsv:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  fputcsv
number of ops:  20
compiled vars:  !0 = $fields, !1 = $delimiter, !2 = $enclosure, !3 = $escape, !4 = $length
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  240     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      '%2C'
          2        RECV_INIT                                        !2      '%22'
          3        RECV_INIT                                        !3      '%5C'
  246     4        INIT_STATIC_METHOD_CALL                                  'fputcsv'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !2
          8        SEND_VAR_EX                                              !3
          9        DO_FCALL                                      0  $5      
         10        ASSIGN                                           ~6      !4, $5
         11        TYPE_CHECK                                    4          ~6
         12      > JMPZ                                                     ~7, ->18
  247    13    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'writeFailed'
         14        FETCH_THIS                                       $8      
         15        SEND_VAR_EX                                              $8
         16        DO_FCALL                                      0  $9      
         17      > THROW                                         0          $9
  250    18    > > RETURN                                                   !4
  251    19*     > RETURN                                                   null

End of function fputcsv

Function fseek:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  fseek
number of ops:  15
compiled vars:  !0 = $offset, !1 = $whence
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  256     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <const ast>
  258     2        INIT_STATIC_METHOD_CALL                                  'fseek'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $2      
          6        IS_IDENTICAL                                             $2, -1
          7      > JMPZ                                                     ~3, ->13
  259     8    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'seekFailed'
          9        FETCH_THIS                                       $4      
         10        SEND_VAR_EX                                              $4
         11        DO_FCALL                                      0  $5      
         12      > THROW                                         0          $5
  262    13    > > RETURN                                                   0
  263    14*     > RETURN                                                   null

End of function fseek

Function ftell:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  ftell
number of ops:  12
compiled vars:  !0 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  270     0  E >   INIT_STATIC_METHOD_CALL                                  'ftell'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                           ~2      !0, $1
          3        TYPE_CHECK                                    4          ~2
          4      > JMPZ                                                     ~3, ->10
  271     5    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'tellFailed'
          6        FETCH_THIS                                       $4      
          7        SEND_VAR_EX                                              $4
          8        DO_FCALL                                      0  $5      
          9      > THROW                                         0          $5
  274    10    > > RETURN                                                   !0
  275    11*     > RETURN                                                   null

End of function ftell

Function ftruncate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j3d0G
function name:  ftruncate
number of ops:  13
compiled vars:  !0 = $size
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  280     0  E >   RECV                                             !0      
  282     1        INIT_STATIC_METHOD_CALL                                  'ftruncate'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        BOOL_NOT                                         ~2      $1
          5      > JMPZ                                                     ~2, ->11
  283     6    >   INIT_STATIC_METHOD_CALL                                  'KHerGe%5CFile%5CException%5CFileException', 'truncateFailed'
          7        FETCH_THIS                                       $3      
          8        SEND_VAR_EX                                              $3
          9        DO_FCALL                              

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.16 ms | 1428 KiB | 25 Q