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 => ""); $json = json_encode($array); echo "JSON: ".$json."\n"; var_dump(json_decode($json));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v0TrV
function name:  (null)
number of ops:  17
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                                               'json_encode'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    8     7        CONCAT                                           ~8      'JSON%3A+', !2
          8        CONCAT                                           ~9      ~8, '%0A'
          9        ECHO                                                     ~9
   10    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'json_decode'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.05 ms | 1394 KiB | 19 Q