3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<'EOJSON' { "a": [ "No", "Yes" ], "b": { "0": "No", "1": "Yes" } } EOJSON; $json = json_decode($json); var_dump($json); echo json_encode($json, JSON_PRETTY_PRINT), "\n", json_encode($json, JSON_FORCE_OBJECT | JSON_PRETTY_PRINT);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bd2bs
function name:  (null)
number of ops:  20
compiled vars:  !0 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++++%22a%22%3A+%5B%0A++++++++%22No%22%2C%0A++++++++%22Yes%22%0A++++%5D%2C%0A++++%22b%22%3A+%7B%0A++++++++%220%22%3A+%22No%22%2C%0A++++++++%221%22%3A+%22Yes%22%0A++++%7D%0A%7D'
   15     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
   16     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   17     8        INIT_FCALL                                               'json_encode'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 128
         11        DO_ICALL                                         $5      
         12        ECHO                                                     $5
         13        ECHO                                                     '%0A'
   18    14        INIT_FCALL                                               'json_encode'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 144
         17        DO_ICALL                                         $6      
         18        ECHO                                                     $6
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
290.07 ms | 1012 KiB | 16 Q