3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ["day1" => 1, "day2" => 1, "name" => "Ram"], ["day1" => 1, "day2" => 2, "name" => "Raj"], ["day1" => 1, "day2" => 3, "name" => "Rahul"], ["day1" => 2, "day2" => 3, "name" => "Rocky"] ]; foreach ($array as &$row) { $day1 = min($day1 ?? $row['day1'], $row['day1']); $day2 = max($day2 ?? $row['day2'], $row['day2']); $row['day1'] = &$day1; $row['day2'] = &$day2; } var_export($array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 26
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 26
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/BmESHk
function name:  (null)
number of ops:  31
compiled vars:  !0 = $array, !1 = $row, !2 = $day1, !3 = $day2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1      > FE_RESET_RW                                      $5      !0, ->26
          2    > > FE_FETCH_RW                                              $5, !1, ->26
   11     3    >   INIT_FCALL                                               'min'
          4        COALESCE                                         ~6      !2
          5        FETCH_DIM_R                                      ~7      !1, 'day1'
          6        QM_ASSIGN                                        ~6      ~7
          7        SEND_VAL                                                 ~6
          8        FETCH_DIM_R                                      ~8      !1, 'day1'
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
   12    12        INIT_FCALL                                               'max'
         13        COALESCE                                         ~11     !3
         14        FETCH_DIM_R                                      ~12     !1, 'day2'
         15        QM_ASSIGN                                        ~11     ~12
         16        SEND_VAL                                                 ~11
         17        FETCH_DIM_R                                      ~13     !1, 'day2'
         18        SEND_VAL                                                 ~13
         19        DO_ICALL                                         $14     
         20        ASSIGN                                                   !3, $14
   13    21        FETCH_DIM_W                                      $16     !1, 'day1'
         22        ASSIGN_REF                                               $16, !2
   14    23        FETCH_DIM_W                                      $18     !1, 'day2'
         24        ASSIGN_REF                                               $18, !3
   10    25      > JMP                                                      ->2
         26    >   FE_FREE                                                  $5
   16    27        INIT_FCALL                                               'var_export'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.05 ms | 1401 KiB | 19 Q