3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( sample( 100, 'OxTest' ), sample( 101, 'OxTest' ), ); print_r( $array ); function sample( $id, $value ) { return array( 'input_' . $id => array( 'input_value' => $value ) ); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Td7Fv
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'sample'
          1        SEND_VAL_EX                                              100
          2        SEND_VAL_EX                                              'OxTest'
          3        DO_FCALL                                      0  $1      
          4        INIT_ARRAY                                       ~2      $1
    4     5        INIT_FCALL_BY_NAME                                       'sample'
          6        SEND_VAL_EX                                              101
          7        SEND_VAL_EX                                              'OxTest'
          8        DO_FCALL                                      0  $3      
          9        ADD_ARRAY_ELEMENT                                ~2      $3
    2    10        ASSIGN                                                   !0, ~2
    8    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   13    14      > RETURN                                                   1

Function sample:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Td7Fv
function name:  sample
number of ops:  7
compiled vars:  !0 = $id, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        CONCAT                                           ~2      'input_', !0
          3        INIT_ARRAY                                       ~3      !1, 'input_value'
          4        INIT_ARRAY                                       ~4      ~3, ~2
          5      > RETURN                                                   ~4
   13     6*     > RETURN                                                   null

End of function sample

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.16 ms | 1395 KiB | 15 Q