3v4l.org

run code in 300+ PHP versions simultaneously
<?php $default = array('GBP','USD'); $currencies = null; if ( ! is_array($currencies) ) $currencies = array($currencies); $c = array_merge($currencies, $default); var_dump(array_unique($c));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/5umP9
function name:  (null)
number of ops:  19
compiled vars:  !0 = $default, !1 = $currencies, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, null
    6     2        TYPE_CHECK                                  128  ~5      !1
          3        BOOL_NOT                                         ~6      ~5
          4      > JMPZ                                                     ~6, ->7
    7     5    >   INIT_ARRAY                                       ~7      !1
          6        ASSIGN                                                   !1, ~7
   10     7    >   INIT_FCALL                                               'array_merge'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
   11    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'array_unique'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $11     
         16        SEND_VAR                                                 $11
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.21 ms | 1395 KiB | 19 Q