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); $json = json_encode($array); echo json_last_error(); 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/Q2nsF
function name:  (null)
number of ops:  22
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        INIT_FCALL                                               'json_last_error'
         11        DO_ICALL                                         $9      
         12        ECHO                                                     $9
   11    13        CONCAT                                           ~10     !2, '%0A'
         14        ECHO                                                     ~10
   13    15        INIT_FCALL                                               'print_r'
         16        INIT_FCALL                                               'json_decode'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $11     
         19        SEND_VAR                                                 $11
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.16 ms | 1395 KiB | 21 Q