3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array(array("Price" => 66), array("Price" => 99)); function extractPrice($guestPrices, $priceType) { $modifier = 10; $newArray = array(); foreach($guestPrices as $guestPrice){ $newArray[] = $guestPrice[$priceType]*$modifier; } return $newArray; } var_dump(extractPrice($data, 'Price'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hbFr1
function name:  (null)
number of ops:  9
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'extractprice'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'Price'
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function extractprice:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/hbFr1
function name:  extractPrice
number of ops:  14
compiled vars:  !0 = $guestPrices, !1 = $priceType, !2 = $modifier, !3 = $newArray, !4 = $guestPrice
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        ASSIGN                                                   !2, 10
    7     3        ASSIGN                                                   !3, <array>
    8     4      > FE_RESET_R                                       $7      !0, ->11
          5    > > FE_FETCH_R                                               $7, !4, ->11
    9     6    >   FETCH_DIM_R                                      ~9      !4, !1
          7        MUL                                              ~10     !2, ~9
          8        ASSIGN_DIM                                               !3
          9        OP_DATA                                                  ~10
    8    10      > JMP                                                      ->5
         11    >   FE_FREE                                                  $7
   11    12      > RETURN                                                   !3
   12    13*     > RETURN                                                   null

End of function extractprice

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.75 ms | 1398 KiB | 16 Q