3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo PHP_INT_MAX, "\n"; $a = array('a' => PHP_INT_MAX); /* it works OK if you put PHP_INT_MAX-1 here */ print_r($a); $j = json_encode($a); echo $j, "\n"; $b = json_decode($j); /* produces the incorrect error message */ print_r($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AasT7
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $j, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     9223372036854775807
          1        ECHO                                                     '%0A'
    5     2        ASSIGN                                                   !0, <array>
    6     3        INIT_FCALL                                               'print_r'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    7     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    9    10        ECHO                                                     !1
         11        ECHO                                                     '%0A'
   11    12        INIT_FCALL                                               'json_decode'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !2, $7
   12    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.8 ms | 999 KiB | 16 Q