3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s_con = array_values(array_filter(file('count.txt'), create_function('$a', 'return rtrim($a) != "~";'))); $index = file_get_contents('count_index.txt'); file_put_contents('count_index.txt', ($index + 1) % count($s_con)); // PHP5 echo $s_con[$index]; var_dump(($index + 1) % count($s_con));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CvGFb
function name:  (null)
number of ops:  35
compiled vars:  !0 = $s_con, !1 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'array_values'
          1        INIT_FCALL                                               'array_filter'
          2        INIT_FCALL                                               'file'
          3        SEND_VAL                                                 'count.txt'
          4        DO_ICALL                                         $2      
          5        SEND_VAR                                                 $2
    3     6        INIT_FCALL_BY_NAME                                       'create_function'
          7        SEND_VAL_EX                                              '%24a'
          8        SEND_VAL_EX                                              'return+rtrim%28%24a%29+%21%3D+%22%7E%22%3B'
          9        DO_FCALL                                      0  $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                         $5      
    2    14        ASSIGN                                                   !0, $5
    5    15        INIT_FCALL                                               'file_get_contents'
         16        SEND_VAL                                                 'count_index.txt'
         17        DO_ICALL                                         $7      
         18        ASSIGN                                                   !1, $7
    6    19        INIT_FCALL                                               'file_put_contents'
         20        SEND_VAL                                                 'count_index.txt'
         21        ADD                                              ~9      !1, 1
         22        COUNT                                            ~10     !0
         23        MOD                                              ~11     ~9, ~10
         24        SEND_VAL                                                 ~11
         25        DO_ICALL                                                 
    7    26        FETCH_DIM_R                                      ~13     !0, !1
         27        ECHO                                                     ~13
    9    28        INIT_FCALL                                               'var_dump'
         29        ADD                                              ~14     !1, 1
         30        COUNT                                            ~15     !0
         31        MOD                                              ~16     ~14, ~15
         32        SEND_VAL                                                 ~16
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.53 ms | 1396 KiB | 25 Q