3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '[]'; for ($i = 0; $i < 50000; $i++) $string = '[' . $string . ']'; $s = microtime(true); $result = json_decode($string); var_dump($result, json_last_error(), JSON_ERROR_DEPTH, round(microtime(true) - $s, 5)); var_dump(microtime(true) - $s);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/YbVHe
function name:  (null)
number of ops:  41
compiled vars:  !0 = $string, !1 = $i, !2 = $s, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B%5D'
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->7
    6     3    >   CONCAT                                           ~6      '%5B', !0
          4        CONCAT                                           ~7      ~6, '%5D'
          5        ASSIGN                                                   !0, ~7
    5     6        PRE_INC                                                  !1
          7    >   IS_SMALLER                                               !1, 50000
          8      > JMPNZ                                                    ~10, ->3
    8     9    >   INIT_FCALL                                               'microtime'
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $11     
         12        ASSIGN                                                   !2, $11
   10    13        INIT_FCALL                                               'json_decode'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $13     
         16        ASSIGN                                                   !3, $13
   12    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !3
         19        INIT_FCALL                                               'json_last_error'
         20        DO_ICALL                                         $15     
         21        SEND_VAR                                                 $15
         22        SEND_VAL                                                 1
         23        INIT_FCALL                                               'round'
         24        INIT_FCALL                                               'microtime'
         25        SEND_VAL                                                 <true>
         26        DO_ICALL                                         $16     
         27        SUB                                              ~17     $16, !2
         28        SEND_VAL                                                 ~17
         29        SEND_VAL                                                 5
         30        DO_ICALL                                         $18     
         31        SEND_VAR                                                 $18
         32        DO_ICALL                                                 
   14    33        INIT_FCALL                                               'var_dump'
         34        INIT_FCALL                                               'microtime'
         35        SEND_VAL                                                 <true>
         36        DO_ICALL                                         $20     
         37        SUB                                              ~21     $20, !2
         38        SEND_VAL                                                 ~21
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.58 ms | 1400 KiB | 23 Q