3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array('0.txt','1.txt','2.txt','3.txt'); $n=(int)current(explode('.',end($a))); $a[]=($n+1).'.txt'; print_r($a); $n=(int)current(explode('.',end($a))); $a[]=($n+1).'.txt'; print_r($a); $n=(int)current(explode('.',end($a))); $a[]=($n+1).'.txt'; print_r($a); $a[]=count($a).'.txt'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PJGho
function name:  (null)
number of ops:  63
compiled vars:  !0 = $a, !1 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'current'
          2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '.'
          4        INIT_FCALL                                               'end'
          5        SEND_REF                                                 !0
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                         $5      
         11        CAST                                          4  ~6      $5
         12        ASSIGN                                                   !1, ~6
    6    13        ADD                                              ~9      !1, 1
         14        CONCAT                                           ~10     ~9, '.txt'
         15        ASSIGN_DIM                                               !0
         16        OP_DATA                                                  ~10
    7    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
    8    20        INIT_FCALL                                               'current'
         21        INIT_FCALL                                               'explode'
         22        SEND_VAL                                                 '.'
         23        INIT_FCALL                                               'end'
         24        SEND_REF                                                 !0
         25        DO_ICALL                                         $12     
         26        SEND_VAR                                                 $12
         27        DO_ICALL                                         $13     
         28        SEND_VAR                                                 $13
         29        DO_ICALL                                         $14     
         30        CAST                                          4  ~15     $14
         31        ASSIGN                                                   !1, ~15
    9    32        ADD                                              ~18     !1, 1
         33        CONCAT                                           ~19     ~18, '.txt'
         34        ASSIGN_DIM                                               !0
         35        OP_DATA                                                  ~19
   10    36        INIT_FCALL                                               'print_r'
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                                 
   11    39        INIT_FCALL                                               'current'
         40        INIT_FCALL                                               'explode'
         41        SEND_VAL                                                 '.'
         42        INIT_FCALL                                               'end'
         43        SEND_REF                                                 !0
         44        DO_ICALL                                         $21     
         45        SEND_VAR                                                 $21
         46        DO_ICALL                                         $22     
         47        SEND_VAR                                                 $22
         48        DO_ICALL                                         $23     
         49        CAST                                          4  ~24     $23
         50        ASSIGN                                                   !1, ~24
   12    51        ADD                                              ~27     !1, 1
         52        CONCAT                                           ~28     ~27, '.txt'
         53        ASSIGN_DIM                                               !0
         54        OP_DATA                                                  ~28
   13    55        INIT_FCALL                                               'print_r'
         56        SEND_VAR                                                 !0
         57        DO_ICALL                                                 
   14    58        COUNT                                            ~31     !0
         59        CONCAT                                           ~32     ~31, '.txt'
         60        ASSIGN_DIM                                               !0
         61        OP_DATA                                                  ~32
   17    62      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.48 ms | 1400 KiB | 21 Q