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 => ""); var_dump($array); $json = json_encode($array); var_dump($json); var_dump(json_decode($json)); var_dump(json_encode('hey now')); /* $x = 'Audio Pass: Get live NFL game audio while you’re on the road with Audio Pass.'; var_dump(htmlentities($x)); var_dump(htmlentities($x, ENT_COMPAT | ENT_SUBSTITUTE, 'ISO-8859-1')); var_dump(htmlentities($x, ENT_COMPAT | ENT_SUBSTITUTE, 'UTF-8')); */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uOjk2
function name:  (null)
number of ops:  26
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                                               'var_dump'
          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                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
   12    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'json_decode'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
   15    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'json_encode'
         21        SEND_VAL                                                 'hey+now'
         22        DO_ICALL                                         $12     
         23        SEND_VAR                                                 $12
         24        DO_ICALL                                                 
   27    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.21 ms | 1395 KiB | 19 Q