3v4l.org

run code in 500+ PHP versions simultaneously
<?php $weather = [ ['time' => '00:00', 'temp' => '15.1'], ['time' => '00:00', 'temp' => '15.1'], ['time' => '00:01', 'temp' => '15.1'], ['time' => '00:02', 'temp' => '15.1'], ['time' => '00:02', 'temp' => '15.1'], ['time' => '00:02', 'temp' => '15.0'], ['time' => '00:03', 'temp' => '15.0'], ]; $result = []; foreach ($weather as $row) { if (!$result || $row['temp'] > $result['temp']) { $result = $row; } } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
Branch analysis from position: 10
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/RnB0X
function name:  (null)
number of ops:  18
compiled vars:  !0 = $weather, !1 = $result, !2 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   13     1        ASSIGN                                                       !1, <array>
   14     2      > FE_RESET_R                                           $5      !0, ->13
          3    > > FE_FETCH_R                                                   $5, !2, ->13
   15     4    >   BOOL_NOT                                             ~6      !1
          5      > JMPNZ_EX                                             ~6      ~6, ->10
          6    >   FETCH_DIM_R                                          ~7      !2, 'temp'
          7        FETCH_DIM_R                                          ~8      !1, 'temp'
          8        IS_SMALLER                                           ~9      ~8, ~7
          9        BOOL                                                 ~6      ~9
         10    > > JMPZ                                                         ~6, ->12
   16    11    >   ASSIGN                                                       !1, !2
   14    12    > > JMP                                                          ->3
         13    >   FE_FREE                                                      $5
   20    14        INIT_FCALL                                                   'var_export'
         15        SEND_VAR                                                     !1
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.43 ms | 1738 KiB | 14 Q