3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rates = array( array("serviceType" => 1, "unit" => "word", "unitRate" => "0.05000"), array("serviceType" => 2, "unit" => "word", "unitRate" => "0.02500"), array("serviceType" => 3, "unit" => "hour", "unitRate" => "15.0000"), array("serviceType" => 4, "unit" => "hour", "unitRate" => "15.0000"), array("serviceType" => 5, "unit" => "hour", "unitRate" => "25.0000"), array("serviceType" => 1, "unit" => "word", "unitRate" => "0.04000"), array("serviceType" => 6, "unit" => "minute", "unitRate" => "7.0000"), array("serviceType" => 7, "unit" => "minute", "unitRate" => "1.5000"), array("serviceType" => 8, "unit" => "minute", "unitRate" => "0.28330") ); foreach($rates as $rate){ $deduplicated_rates[$rate['serviceType'].$rate['unit']] = $rate; } var_dump($rates); var_dump(array_values($deduplicated_rates));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/R4qpk
function name:  (null)
number of ops:  20
compiled vars:  !0 = $rates, !1 = $rate, !2 = $deduplicated_rates
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1      > FE_RESET_R                                       $4      !0, ->9
          2    > > FE_FETCH_R                                               $4, !1, ->9
   16     3    >   FETCH_DIM_R                                      ~5      !1, 'serviceType'
          4        FETCH_DIM_R                                      ~6      !1, 'unit'
          5        CONCAT                                           ~7      ~5, ~6
          6        ASSIGN_DIM                                               !2, ~7
          7        OP_DATA                                                  !1
   15     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $4
   19    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   20    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'array_values'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
123.35 ms | 998 KiB | 15 Q