3v4l.org

run code in 500+ PHP versions simultaneously
<?php //Source: https://bugs.php.net/bug.php?id=63898 $key = "Foo " . chr(163); $array = array($key => ""); print_r($array); $json = json_encode($array); echo $json."\n"; print_r(json_decode($json));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rbKIV
function name:  (null)
number of ops:  19
compiled vars:  !0 = $key, !1 = $array, !2 = $json
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, 'Foo+%A3'
    5     1        INIT_ARRAY                                           ~4      '', !0
          2        ASSIGN                                                       !1, ~4
    7     3        INIT_FCALL                                                   'print_r'
          4        SEND_VAR                                                     !1
          5        DO_ICALL                                                     
    9     6        INIT_FCALL                                                   'json_encode'
          7        SEND_VAR                                                     !1
          8        DO_ICALL                                             $7      
          9        ASSIGN                                                       !2, $7
   10    10        CONCAT                                               ~9      !2, '%0A'
         11        ECHO                                                         ~9
   12    12        INIT_FCALL                                                   'print_r'
         13        INIT_FCALL                                                   'json_decode'
         14        SEND_VAR                                                     !2
         15        DO_ICALL                                             $10     
         16        SEND_VAR                                                     $10
         17        DO_ICALL                                                     
         18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.7 ms | 2797 KiB | 16 Q