3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 0, $a = array(); $i < 511; $i++) $a = array($a); echo json_encode($a), "\n"; for ($i = 0, $a = array(); $i < 512; $i++) $a = array($a); echo json_encode($a), "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 16
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 16
Branch analysis from position: 21
Branch analysis from position: 16
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/mNr4l
function name:  (null)
number of ops:  27
compiled vars:  !0 = $i, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1        ASSIGN                                                   !1, <array>
          2      > JMP                                                      ->6
          3    >   INIT_ARRAY                                       ~4      !1
          4        ASSIGN                                                   !1, ~4
          5        PRE_INC                                                  !0
          6    >   IS_SMALLER                                               !0, 511
          7      > JMPNZ                                                    ~7, ->3
    4     8    >   INIT_FCALL                                               'json_encode'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $8      
         11        ECHO                                                     $8
         12        ECHO                                                     '%0A'
    7    13        ASSIGN                                                   !0, 0
         14        ASSIGN                                                   !1, <array>
         15      > JMP                                                      ->19
         16    >   INIT_ARRAY                                       ~11     !1
         17        ASSIGN                                                   !1, ~11
         18        PRE_INC                                                  !0
         19    >   IS_SMALLER                                               !0, 512
         20      > JMPNZ                                                    ~14, ->16
    8    21    >   INIT_FCALL                                               'json_encode'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $15     
         24        ECHO                                                     $15
         25        ECHO                                                     '%0A'
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.05 ms | 1400 KiB | 15 Q