3v4l.org

run code in 300+ PHP versions simultaneously
<?php final readonly class File { /** * @var resource */ private mixed $resource; public function __construct(string $file) { $this->resource = fopen($file, 'r'); } public function close(): void { fclose($this->resource); } public function rewind(): void { rewind($this->resource); } } $f = new File(__FILE__); $f->close(); $f->rewind();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kljvE
function name:  (null)
number of ops:  9
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'File'
          1        SEND_VAL_EX                                              '%2Fin%2FkljvE'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   27     4        INIT_METHOD_CALL                                         !0, 'close'
          5        DO_FCALL                                      0          
   28     6        INIT_METHOD_CALL                                         !0, 'rewind'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class File:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kljvE
function name:  __construct
number of ops:  8
compiled vars:  !0 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'fopen'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'r'
          4        DO_ICALL                                         $2      
          5        ASSIGN_OBJ                                               'resource'
          6        OP_DATA                                                  $2
   13     7      > RETURN                                                   null

End of function __construct

Function close:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kljvE
function name:  close
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'fclose'
          1        FETCH_OBJ_R                                      ~0      'resource'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   18     4      > RETURN                                                   null

End of function close

Function rewind:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kljvE
function name:  rewind
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'rewind'
          1        FETCH_OBJ_R                                      ~0      'resource'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   23     4      > RETURN                                                   null

End of function rewind

End of class File.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.86 ms | 1435 KiB | 16 Q