3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Fundtion take array as arguments * print out the preformatted array. * * Prince Adeyemi * */ $data = array( 'first_name' => "John", 'last_name' => "Doe", 'address' => '123 Main St.', 'city' => 'Las Vegas', 'state' => 'NV', 'country' => 'USA', 'orderid' => 1234, 'item_desc' => 'Test order', 'item_price' => 29.99, 'shipping' => 2.99 ); process_order( $data ); function process_order( $data ) { if( count($data) > 0 ) { /** do something with array like order submission, registration etc. */ echo "Processing order # " . $data['orderid'] . " for " . $data['first_name']; print_r( $data ); } else { print "No data received"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o23QT
function name:  (null)
number of ops:  5
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   25     1        INIT_FCALL_BY_NAME                                       'process_order'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   42     4      > RETURN                                                   1

Function process_order:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o23QT
function name:  process_order
number of ops:  16
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   30     1        COUNT                                            ~1      !0
          2        IS_SMALLER                                               0, ~1
          3      > JMPZ                                                     ~2, ->14
   36     4    >   FETCH_DIM_R                                      ~3      !0, 'orderid'
          5        CONCAT                                           ~4      'Processing+order+%23+', ~3
          6        CONCAT                                           ~5      ~4, '+for+'
          7        FETCH_DIM_R                                      ~6      !0, 'first_name'
          8        CONCAT                                           ~7      ~5, ~6
          9        ECHO                                                     ~7
   37    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > JMP                                                      ->15
   40    14    >   ECHO                                                     'No+data+received'
   42    15    > > RETURN                                                   null

End of function process_order

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.53 ms | 1395 KiB | 15 Q