3v4l.org

run code in 300+ PHP versions simultaneously
<?php $site_id['locale'] = 'tr'; $exampleArray = ['us', 'gr']; if (!in_array($site_id['locale'], $exampleArray)) { array_unshift($exampleArray, $site_id['locale']); } echo implode(', ', $exampleArray);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/O4ctO
function name:  (null)
number of ops:  21
compiled vars:  !0 = $site_id, !1 = $exampleArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 'locale'
          1        OP_DATA                                                  'tr'
    4     2        ASSIGN                                                   !1, <array>
    6     3        INIT_FCALL                                               'in_array'
          4        FETCH_DIM_R                                      ~4      !0, 'locale'
          5        SEND_VAL                                                 ~4
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $5      
          8        BOOL_NOT                                         ~6      $5
          9      > JMPZ                                                     ~6, ->15
    7    10    >   INIT_FCALL                                               'array_unshift'
         11        SEND_REF                                                 !1
         12        FETCH_DIM_R                                      ~7      !0, 'locale'
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                                 
   10    15    >   INIT_FCALL                                               'implode'
         16        SEND_VAL                                                 '%2C+'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $9      
         19        ECHO                                                     $9
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.15 ms | 1003 KiB | 16 Q