3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 0; if ($handle = opendir('.')) { while (false !== ($entry = readdir($handle))) { $count++; } closedir($handle); } $f = fopen("test", "w"); while(true) { fwrite($f, "0000000000000000000000000000000000000000"); } echo $count;

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 17
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 23
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 23
Branch analysis from position: 28
Branch analysis from position: 23
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
Branch analysis from position: 17
filename:       /in/oAlM6
function name:  (null)
number of ops:  30
compiled vars:  !0 = $count, !1 = $handle, !2 = $entry, !3 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        INIT_FCALL                                               'opendir'
          2        SEND_VAL                                                 '.'
          3        DO_ICALL                                         $5      
          4        ASSIGN                                           ~6      !1, $5
          5      > JMPZ                                                     ~6, ->17
    4     6    > > JMP                                                      ->8
    5     7    >   PRE_INC                                                  !0
    4     8    >   INIT_FCALL                                               'readdir'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $8      
         11        ASSIGN                                           ~9      !2, $8
         12        TYPE_CHECK                                  1018          ~9
         13      > JMPNZ                                                    ~10, ->7
    7    14    >   INIT_FCALL                                               'closedir'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   10    17    >   INIT_FCALL                                               'fopen'
         18        SEND_VAL                                                 'test'
         19        SEND_VAL                                                 'w'
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !3, $12
   11    22      > JMP                                                      ->27
   12    23    >   INIT_FCALL                                               'fwrite'
         24        SEND_VAR                                                 !3
         25        SEND_VAL                                                 '0000000000000000000000000000000000000000'
         26        DO_ICALL                                                 
   11    27    > > JMPNZ                                                    <true>, ->23
   15    28    >   ECHO                                                     !0
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.81 ms | 1396 KiB | 23 Q