3v4l.org

run code in 300+ PHP versions simultaneously
<?php $MonthlyData = [ ["Name" => "AHMAD SUFFIAN BIN AHMAD LOTFI","SLAData" => [0,0,0,0,0,0],"RatingData" => [0,0,0,0,0,0]], ["Name" => "OVERALL","SLAData" => [19,8,50,0,0,100],"RatingData" => [95,95,100,0,0,0]], ["Name" => "JAYALETCHUMI A\/P VENGADASALAM","SLAData" => [33,14,100,0,0,0],"RatingData" => [90,90,100,0,0,0]], ["Name" => "MOHAMMAD FIRDHAUS BIN ISMAIL","SLAData" => [0,0,0,0,0,0],"RatingData" => [100,100,0,0,0,0]], ["Name" => "YOGESWARAN A\/L PUSSAN","SLAData" => [0,0,0,0,0,0],"RatingData" => [0,0,0,0,0,0]], ["Name" => "JAYAKUMAR PARAMASIVAM","SLAData" => [0,0,0,0,0,100],"RatingData" => [0,0,0,0,0,0]] ]; $Temp=[]; foreach ($MonthlyData as $data) { if ($data['Name'] === 'OVERALL') { $Temp[] = $data; } else { array_unshift($Temp, $data); } } $MonthlyData = $Temp; var_dump($MonthlyData);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/G2EJf
function name:  (null)
number of ops:  21
compiled vars:  !0 = $MonthlyData, !1 = $Temp, !2 = $data
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, ->15
          3    > > FE_FETCH_R                                               $5, !2, ->15
   15     4    >   FETCH_DIM_R                                      ~6      !2, 'Name'
          5        IS_IDENTICAL                                             ~6, 'OVERALL'
          6      > JMPZ                                                     ~7, ->10
   16     7    >   ASSIGN_DIM                                               !1
          8        OP_DATA                                                  !2
   15     9      > JMP                                                      ->14
   19    10    >   INIT_FCALL                                               'array_unshift'
         11        SEND_REF                                                 !1
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   14    14    > > JMP                                                      ->3
         15    >   FE_FREE                                                  $5
   22    16        ASSIGN                                                   !0, !1
   23    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.82 ms | 1011 KiB | 15 Q