3v4l.org

run code in 300+ PHP versions simultaneously
<?php $browser_list = ["test"]; $template_directory = "test"; function getTemplateProperties() { global $browser_list; global $template_directory; $json_data = json_decode(file_get_contents("properties.map"), true); $browser_list=$json_data["data"]["browsers"]; print_r($browser_list); $template_directory=$json_data["data"]["template_folder"]; print_r($template_directory); } getTemplateProperties(); print_r( $browser_list); // outputs 15 echo $template_directory; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GbIV2
function name:  (null)
number of ops:  9
compiled vars:  !0 = $browser_list, !1 = $template_directory
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'test'
   16     2        INIT_FCALL                                               'gettemplateproperties'
          3        DO_FCALL                                      0          
   17     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   18     7        ECHO                                                     !1
   19     8      > RETURN                                                   1

Function gettemplateproperties:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GbIV2
function name:  getTemplateProperties
number of ops:  23
compiled vars:  !0 = $browser_list, !1 = $template_directory, !2 = $json_data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_GLOBAL                                              !0, 'browser_list'
    7     1        BIND_GLOBAL                                              !1, 'template_directory'
    8     2        INIT_FCALL                                               'json_decode'
          3        INIT_FCALL                                               'file_get_contents'
          4        SEND_VAL                                                 'properties.map'
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !2, $4
    9    10        FETCH_DIM_R                                      ~6      !2, 'data'
         11        FETCH_DIM_R                                      ~7      ~6, 'browsers'
         12        ASSIGN                                                   !0, ~7
   10    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   11    16        FETCH_DIM_R                                      ~10     !2, 'data'
         17        FETCH_DIM_R                                      ~11     ~10, 'template_folder'
         18        ASSIGN                                                   !1, ~11
   13    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
   14    22      > RETURN                                                   null

End of function gettemplateproperties

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.08 ms | 1399 KiB | 20 Q