3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = createArray('id', "a"); echo $arr['jiraId']; echo $arr['casinoCode']; echo $arr['whatever']; function createArray($jiraId = null, $casinoCode = null) : array { if ($casinoCode){ echo "CASINO"; } return array('jiraId' => $jiraId, 'casinoCode' => $casinoCode); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/orIiH
function name:  (null)
number of ops:  12
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'createArray'
          1        SEND_VAL_EX                                              'id'
          2        SEND_VAL_EX                                              'a'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
    4     5        FETCH_DIM_R                                      ~3      !0, 'jiraId'
          6        ECHO                                                     ~3
    5     7        FETCH_DIM_R                                      ~4      !0, 'casinoCode'
          8        ECHO                                                     ~4
    6     9        FETCH_DIM_R                                      ~5      !0, 'whatever'
         10        ECHO                                                     ~5
   13    11      > RETURN                                                   1

Function createarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/orIiH
function name:  createArray
number of ops:  10
compiled vars:  !0 = $jiraId, !1 = $casinoCode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
    9     2      > JMPZ                                                     !1, ->4
   10     3    >   ECHO                                                     'CASINO'
   12     4    >   INIT_ARRAY                                       ~2      !0, 'jiraId'
          5        ADD_ARRAY_ELEMENT                                ~2      !1, 'casinoCode'
          6        VERIFY_RETURN_TYPE                                       ~2
          7      > RETURN                                                   ~2
   13     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function createarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.07 ms | 1394 KiB | 13 Q