3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = []; $x = 63; for ($x = 0; $x < 10000; $x++) { $a[] = substr($x, 0, 1); $a[] = substr($x, 1, 1); // $x_arr = str_split($x); $a[] = array_shift($x); $a[] = array_shift($x); } echo count($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 4
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 4
Branch analysis from position: 31
Branch analysis from position: 4
filename:       /in/2e2PI
function name:  (null)
number of ops:  34
compiled vars:  !0 = $a, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 63
    4     2        ASSIGN                                                   !1, 0
          3      > JMP                                                      ->29
    5     4    >   INIT_FCALL                                               'substr'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 1
          8        DO_ICALL                                         $6      
          9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  $6
    6    11        INIT_FCALL                                               'substr'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 1
         14        SEND_VAL                                                 1
         15        DO_ICALL                                         $8      
         16        ASSIGN_DIM                                               !0
         17        OP_DATA                                                  $8
    9    18        INIT_FCALL                                               'array_shift'
         19        SEND_REF                                                 !1
         20        DO_ICALL                                         $10     
         21        ASSIGN_DIM                                               !0
         22        OP_DATA                                                  $10
   10    23        INIT_FCALL                                               'array_shift'
         24        SEND_REF                                                 !1
         25        DO_ICALL                                         $12     
         26        ASSIGN_DIM                                               !0
         27        OP_DATA                                                  $12
    4    28        PRE_INC                                                  !1
         29    >   IS_SMALLER                                               !1, 10000
         30      > JMPNZ                                                    ~14, ->4
   13    31    >   COUNT                                            ~15     !0
         32        ECHO                                                     ~15
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.89 ms | 1396 KiB | 17 Q