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"; echo json_last_error(), "\n"; for ($i = 0, $a = array(); $i < 512; $i++) $a = array($a); echo 512, json_encode($a), "\n"; echo json_last_error(), "\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 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 21
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 21
Branch analysis from position: 26
Branch analysis from position: 21
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/RIT09
function name:  (null)
number of ops:  37
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'
    5    14        INIT_FCALL                                               'json_last_error'
         15        DO_ICALL                                         $9      
         16        ECHO                                                     $9
         17        ECHO                                                     '%0A'
    8    18        ASSIGN                                                   !0, 0
         19        ASSIGN                                                   !1, <array>
         20      > JMP                                                      ->24
         21    >   INIT_ARRAY                                       ~12     !1
         22        ASSIGN                                                   !1, ~12
         23        PRE_INC                                                  !0
         24    >   IS_SMALLER                                               !0, 512
         25      > JMPNZ                                                    ~15, ->21
    9    26    >   ECHO                                                     512
         27        INIT_FCALL                                               'json_encode'
         28        SEND_VAR                                                 !1
         29        DO_ICALL                                         $16     
         30        ECHO                                                     $16
         31        ECHO                                                     '%0A'
   10    32        INIT_FCALL                                               'json_last_error'
         33        DO_ICALL                                         $17     
         34        ECHO                                                     $17
         35        ECHO                                                     '%0A'
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.32 ms | 1396 KiB | 17 Q