3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Source: https://bugs.php.net/bug.php?id=63898 $key = "Foo " . chr(163); $array = array($key => ""); print_r($array); ini_set('display_errors', 0); $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/dOeeG
function name:  (null)
number of ops:  23
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                                               'ini_set'
          7        SEND_VAL                                                 'display_errors'
          8        SEND_VAL                                                 0
          9        DO_ICALL                                                 
   10    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !2, $8
   11    14        CONCAT                                           ~10     !2, '%0A'
         15        ECHO                                                     ~10
   13    16        INIT_FCALL                                               'print_r'
         17        INIT_FCALL                                               'json_decode'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $11     
         20        SEND_VAR                                                 $11
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.56 ms | 1399 KiB | 21 Q