3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = json_encode(array('a'=>'lastname', 'b'=>'email', 'c'=>'phone')); define('DEFAULT_ROLES', $array); echo print_r(json_decode(DEFAULT_ROLES ),1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S3nls
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_encode'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
    4     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'DEFAULT_ROLES'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'print_r'
          9        INIT_FCALL                                               'json_decode'
         10        FETCH_CONSTANT                                   ~4      'DEFAULT_ROLES'
         11        SEND_VAL                                                 ~4
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        SEND_VAL                                                 1
         15        DO_ICALL                                         $6      
         16        ECHO                                                     $6
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.48 ms | 1394 KiB | 21 Q