3v4l.org

run code in 500+ PHP versions simultaneously
<?php function test($obj) { $obj->fputcsv([]); } $objects = [ new SplFileObject(tempnam(sys_get_temp_dir(), 'tmp')), (new ReflectionClass( "SplFileObject" ))->newInstanceWithoutConstructor(), ]; foreach ($objects as $obj) { test($obj); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/XMvIQ
function name:  (null)
number of ops:  25
compiled vars:  !0 = $objects, !1 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   NEW                                                  $2      'SplFileObject'
          1        INIT_FCALL                                                   'tempnam'
          2        INIT_FCALL                                                   'sys_get_temp_dir'
          3        DO_ICALL                                             $3      
          4        SEND_VAR                                                     $3
          5        SEND_VAL                                                     'tmp'
          6        DO_ICALL                                             $4      
          7        SEND_VAR_NO_REF_EX                                           $4
          8        DO_FCALL                                          0          
          9        INIT_ARRAY                                           ~6      $2
    9    10        NEW                                                  $7      'ReflectionClass'
         11        SEND_VAL_EX                                                  'SplFileObject'
         12        DO_FCALL                                          0          
         13        INIT_METHOD_CALL                                             $7, 'newInstanceWithoutConstructor'
         14        DO_FCALL                                          0  $9      
         15        ADD_ARRAY_ELEMENT                                    ~6      $9
    7    16        ASSIGN                                                       !0, ~6
   12    17      > FE_RESET_R                                           $11     !0, ->23
         18    > > FE_FETCH_R                                                   $11, !1, ->23
   13    19    >   INIT_FCALL                                                   'test'
         20        SEND_VAR                                                     !1
         21        DO_FCALL                                          0          
   12    22      > JMP                                                          ->18
         23    >   FE_FREE                                                      $11
   14    24      > RETURN                                                       1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XMvIQ
function name:  test
number of ops:  5
compiled vars:  !0 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        INIT_METHOD_CALL                                             !0, 'fputcsv'
          2        SEND_VAL_EX                                                  <array>
          3        DO_FCALL                                          0          
    5     4      > RETURN                                                       null

End of function test

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
118.18 ms | 483 KiB | 10 Q