3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '[]'; for ($i = 0; $i < 50000; $i++) $string = '[' . $string . ']'; $s = microtime(true); //var_dump($string); $result = json_decode($string); var_dump($result, json_last_error(), JSON_ERROR_DEPTH); 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/0vArA
function name:  (null)
number of ops:  32
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
   11    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        DO_ICALL                                                 
   13    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $17     
         28        SUB                                              ~18     $17, !2
         29        SEND_VAL                                                 ~18
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.45 ms | 1396 KiB | 21 Q