3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 0, $a = array(); $i < 511; $i++) $a = array($a); echo 511, json_encode($a), "\n"; for ($i = 0, $a = array(); $i < 512; $i++) $a = array($a); echo 512, 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 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 17
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 17
Branch analysis from position: 22
Branch analysis from position: 17
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/Pr8Ud
function name:  (null)
number of ops:  29
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    >   ECHO                                                     511
          9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $8      
         12        ECHO                                                     $8
         13        ECHO                                                     '%0A'
    7    14        ASSIGN                                                   !0, 0
         15        ASSIGN                                                   !1, <array>
         16      > JMP                                                      ->20
         17    >   INIT_ARRAY                                       ~11     !1
         18        ASSIGN                                                   !1, ~11
         19        PRE_INC                                                  !0
         20    >   IS_SMALLER                                               !0, 512
         21      > JMPNZ                                                    ~14, ->17
    8    22    >   ECHO                                                     512
         23        INIT_FCALL                                               'json_encode'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $15     
         26        ECHO                                                     $15
         27        ECHO                                                     '%0A'
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.52 ms | 1396 KiB | 15 Q