3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"object":{},"array":[]}'; $decodedStd = json_decode($json); $decodedArr = json_decode($json, true); $encodedStd = json_encode($decodedStd); $encodedArr = json_encode($decodedArr); var_dump($encodedStd); var_dump($encodedArr); var_dump($json === $encodedStd); var_dump($json === $encodedArr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gMhat
function name:  (null)
number of ops:  33
compiled vars:  !0 = $json, !1 = $decodedStd, !2 = $decodedArr, !3 = $encodedStd, !4 = $encodedArr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22object%22%3A%7B%7D%2C%22array%22%3A%5B%5D%7D'
    5     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    6     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !2, $8
    7    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !3, $10
    8    14        INIT_FCALL                                               'json_encode'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !4, $12
   10    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                                 
   11    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                                 
   12    24        INIT_FCALL                                               'var_dump'
         25        IS_IDENTICAL                                     ~16     !0, !3
         26        SEND_VAL                                                 ~16
         27        DO_ICALL                                                 
   13    28        INIT_FCALL                                               'var_dump'
         29        IS_IDENTICAL                                     ~18     !0, !4
         30        SEND_VAL                                                 ~18
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.07 ms | 1396 KiB | 19 Q