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[] = $x_arr[0]; // $a[] = $x_arr[1]; } echo count($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
Branch analysis from position: 4
filename:       /in/159eK
function name:  (null)
number of ops:  24
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                                                      ->19
    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
    4    18        PRE_INC                                                  !1
         19    >   IS_SMALLER                                               !1, 10000
         20      > JMPNZ                                                    ~10, ->4
   13    21    >   COUNT                                            ~11     !0
         22        ECHO                                                     ~11
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.51 ms | 1395 KiB | 15 Q