3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_country_code() { $cc = 'US'; return $cc; } function get_country_name() { $cn_array = array( 'COUNTRY_NAME' => array( 'AF' => 'Afghanistan', 'US' => 'United Snakes', 'RU' => 'VodkaTown', ), ); $country_code = get_country_code(); $country_name = $cn_array[COUNTRY_NAME][$country_code]; echo $country_name; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7ZHZ
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E > > RETURN                                                   1

Function get_country_code:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7ZHZ
function name:  get_country_code
number of ops:  3
compiled vars:  !0 = $cc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'US'
    7     1      > RETURN                                                   !0
    8     2*     > RETURN                                                   null

End of function get_country_code

Function get_country_name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P7ZHZ
function name:  get_country_name
number of ops:  10
compiled vars:  !0 = $cn_array, !1 = $country_code, !2 = $country_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'get_country_code'
          2        DO_FCALL                                      0  $4      
          3        ASSIGN                                                   !1, $4
   22     4        FETCH_CONSTANT                                   ~6      'COUNTRY_NAME'
          5        FETCH_DIM_R                                      ~7      !0, ~6
          6        FETCH_DIM_R                                      ~8      ~7, !1
          7        ASSIGN                                                   !2, ~8
   24     8        ECHO                                                     !2
   25     9      > RETURN                                                   null

End of function get_country_name

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.17 ms | 1397 KiB | 14 Q