3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'fr_CA' => 'fr' ); $c = 'jp_JP'; $b = $a[$c] ?: $c; echo $b; $d = 'fr_CA'; $b = $a[$c] ?: $c; echo $b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TEZld
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $c, !2 = $b, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, 'jp_JP'
    7     2        FETCH_DIM_R                                      ~6      !0, !1
          3        JMP_SET                                          ~7      ~6, ->5
          4        QM_ASSIGN                                        ~7      !1
          5        ASSIGN                                                   !2, ~7
    8     6        ECHO                                                     !2
   10     7        ASSIGN                                                   !3, 'fr_CA'
   11     8        FETCH_DIM_R                                      ~10     !0, !1
          9        JMP_SET                                          ~11     ~10, ->11
         10        QM_ASSIGN                                        ~11     !1
         11        ASSIGN                                                   !2, ~11
   12    12        ECHO                                                     !2
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.33 ms | 1393 KiB | 13 Q