3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = <<<X eyJleHBlcmltZW50SWQiOiJtanQwX3VSaVNQdXJOLXNBMThsclFRIiwiY2hvc2VuVmFyaWF0aW9uIjoiMSIsInVzZXJJc0luY2x1ZGVkIjoiMSJ9 X; $x = json_decode(base64_decode($x), true); $x['chosenVariation'] = 0; var_dump(base64_encode(json_encode($x)));
based on NJ40c
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9gNZA
function name:  (null)
number of ops:  21
compiled vars:  !0 = $x
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   ASSIGN                                                   !0, 'eyJleHBlcmltZW50SWQiOiJtanQwX3VSaVNQdXJOLXNBMThsclFRIiwiY2hvc2VuVmFyaWF0aW9uIjoiMSIsInVzZXJJc0luY2x1ZGVkIjoiMSJ9'
   7     1        INIT_FCALL                                               'json_decode'
         2        INIT_FCALL                                               'base64_decode'
         3        SEND_VAR                                                 !0
         4        DO_ICALL                                         $2      
         5        SEND_VAR                                                 $2
         6        SEND_VAL                                                 <true>
         7        DO_ICALL                                         $3      
         8        ASSIGN                                                   !0, $3
   9     9        ASSIGN_DIM                                               !0, 'chosenVariation'
        10        OP_DATA                                                  0
  11    11        INIT_FCALL                                               'var_dump'
        12        INIT_FCALL                                               'base64_encode'
        13        INIT_FCALL                                               'json_encode'
        14        SEND_VAR                                                 !0
        15        DO_ICALL                                         $6      
        16        SEND_VAR                                                 $6
        17        DO_ICALL                                         $7      
        18        SEND_VAR                                                 $7
        19        DO_ICALL                                                 
        20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0