3v4l.org

run code in 300+ PHP versions simultaneously
<?php $resultSet = [ ['year' => 2013, 'month' => 6, 'total_count' => 529], ['year' => 2013, 'month' => 7, 'total_count' => 550], ['year' => 2013, 'month' => 8, 'total_count' => 1005], ['year' => 2013, 'month' => 9, 'total_count' => 1021], ['year' => 2013, 'month' => 10, 'total_count' => 1027], ]; $result = []; foreach ($resultSet as $row) { $result[] = [ date('M y', strtotime($row['year'] . '-' . $row['month'])), $row['total_count'] ]; } echo json_encode($result, JSON_PRETTY_PRINT);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/cG66l
function name:  (null)
number of ops:  28
compiled vars:  !0 = $resultSet, !1 = $result, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2      > FE_RESET_R                                       $5      !0, ->21
          3    > > FE_FETCH_R                                               $5, !2, ->21
   14     4    >   INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'M+y'
          6        INIT_FCALL                                               'strtotime'
          7        FETCH_DIM_R                                      ~7      !2, 'year'
          8        CONCAT                                           ~8      ~7, '-'
          9        FETCH_DIM_R                                      ~9      !2, 'month'
         10        CONCAT                                           ~10     ~8, ~9
         11        SEND_VAL                                                 ~10
         12        DO_ICALL                                         $11     
         13        SEND_VAR                                                 $11
         14        DO_ICALL                                         $12     
         15        INIT_ARRAY                                       ~13     $12
   15    16        FETCH_DIM_R                                      ~14     !2, 'total_count'
         17        ADD_ARRAY_ELEMENT                                ~13     ~14
   13    18        ASSIGN_DIM                                               !1
   15    19        OP_DATA                                                  ~13
   12    20      > JMP                                                      ->3
         21    >   FE_FREE                                                  $5
   18    22        INIT_FCALL                                               'json_encode'
         23        SEND_VAR                                                 !1
         24        SEND_VAL                                                 128
         25        DO_ICALL                                         $15     
         26        ECHO                                                     $15
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
227.54 ms | 1002 KiB | 16 Q