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_arr); $a[] = array_shift($x_arr); } 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/BoR6g
function name:  (null)
number of ops:  24
compiled vars:  !0 = $a, !1 = $x, !2 = $x_arr
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
    8     4    >   INIT_FCALL                                               'str_split'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    9     8        INIT_FCALL                                               'array_shift'
          9        SEND_REF                                                 !2
         10        DO_ICALL                                         $9      
         11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  $9
   10    13        INIT_FCALL                                               'array_shift'
         14        SEND_REF                                                 !2
         15        DO_ICALL                                         $11     
         16        ASSIGN_DIM                                               !0
         17        OP_DATA                                                  $11
    4    18        PRE_INC                                                  !1
         19    >   IS_SMALLER                                               !1, 10000
         20      > JMPNZ                                                    ~13, ->4
   13    21    >   COUNT                                            ~14     !0
         22        ECHO                                                     ~14
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.46 ms | 1395 KiB | 17 Q