3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$Input = [0,{"a":1,"b":2,"c":3,"d":[4,5]},[6,[7,8]],9,10]; <- isnt valid PHP. $Input = '[0,{"a":1,"b":2,"c":3,"d":[4,5]},[6,[7,8]],9,10]'; $myArray = explode(',', $Input ); print_r($myArray); $length = strlen($Input); for ($i=0; $i<$length; ++$i) { // echo $Input[$i]; } $Output = '[1,{"a":2,"b":3,"c":4,"d":[5,6]},[7,[8,9]],10,11]'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 13
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 13
Branch analysis from position: 16
Branch analysis from position: 13
filename:       /in/4gG7J
function name:  (null)
number of ops:  18
compiled vars:  !0 = $Input, !1 = $myArray, !2 = $length, !3 = $i, !4 = $Output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%5B0%2C%7B%22a%22%3A1%2C%22b%22%3A2%2C%22c%22%3A3%2C%22d%22%3A%5B4%2C5%5D%7D%2C%5B6%2C%5B7%2C8%5D%5D%2C9%2C10%5D'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    6     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    7     9        STRLEN                                           ~9      !0
         10        ASSIGN                                                   !2, ~9
    8    11        ASSIGN                                                   !3, 0
         12      > JMP                                                      ->14
         13    >   PRE_INC                                                  !3
         14    >   IS_SMALLER                                               !3, !2
         15      > JMPNZ                                                    ~13, ->13
   14    16    >   ASSIGN                                                   !4, '%5B1%2C%7B%22a%22%3A2%2C%22b%22%3A3%2C%22c%22%3A4%2C%22d%22%3A%5B5%2C6%5D%7D%2C%5B7%2C%5B8%2C9%5D%5D%2C10%2C11%5D'
   16    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.64 ms | 940 KiB | 18 Q