3v4l.org

run code in 300+ PHP versions simultaneously
<?php // unbroken loop $directoryIterator = new DirectoryIterator('/'); function segfault() { global $directoryIterator; foreach($directoryIterator as $v) { unset($v); segfault($directoryIterator); } } segfault();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XQlJ2
function name:  (null)
number of ops:  7
compiled vars:  !0 = $directoryIterator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'DirectoryIterator'
          1        SEND_VAL_EX                                              '%2F'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   11     4        INIT_FCALL                                               'segfault'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function segfault:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/XQlJ2
function name:  segfault
number of ops:  10
compiled vars:  !0 = $directoryIterator, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_GLOBAL                                              !0, 'directoryIterator'
    6     1      > FE_RESET_R                                       $2      !0, ->8
          2    > > FE_FETCH_R                                               $2, !1, ->8
    7     3    >   UNSET_CV                                                 !1
    8     4        INIT_FCALL_BY_NAME                                       'segfault'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    6     7      > JMP                                                      ->2
          8    >   FE_FREE                                                  $2
   10     9      > RETURN                                                   null

End of function segfault

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.76 ms | 1398 KiB | 14 Q