3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [ 'id' => 'UP0006-CUSA08724_00-BATTLEFIELDV0000', 'attributes' => [ 'name' => 'Battlefield V [test1]', 'thumbnail-url-base' => 'https://store.playstation.com/store/api/chihiro/00_09_000/container/US/en/999/UP0006-CUSA08724_00-BATTLEFIELDV0000/1539651459000/image', 'release-date' => '2018-12-14T00:00:00Z' ], ], [ 'id' => 'UP0006-CUSA08724_00-BATTLEFIELDV0000', 'attributes' => [ 'name' => 'Battlefield V [test2]', 'thumbnail-url-base' => 'https://store.playstation.com/store/api/chihiro/00_09_000/container/US/en/999/UP0006-CUSA08724_00-BATTLEFIELDV0000/1539651459000/image', 'release-date' => '2018-10-14T00:00:00Z' ], ], [ 'id' => 'UP0006-CUSA08724_00-BATTLEFIELDV0000', 'attributes' => [ 'name' => 'Battlefield V [test3]', 'thumbnail-url-base' => 'https://store.playstation.com/store/api/chihiro/00_09_000/container/US/en/999/UP0006-CUSA08724_00-BATTLEFIELDV0000/1539651459000/image', 'release-date' => '2019-10-14T00:00:00Z' ], ], [ 'id' => 'UP0006-CUSA08724_00-BATTLEFIELDV0000', 'attributes' => [ 'name' => "Barbie's selfie adventures", 'thumbnail-url-base' => 'https://store.playstation.com/store/api/chihiro/00_09_000/container/US/en/999/UP0006-CUSA08724_00-BATTLEFIELDV0000/1539651459000/image', 'release-date' => '2018-10-18T00:00:00Z' ], ], ]; foreach($arr as $game){ $timeleft = strtotime($game['attributes']['release-date'])-time(); if($timeleft>0) $games[$timeleft] = floor($timeleft/86400) ." days left to ".$game['attributes']['name'] ." \n"; } ksort($games); echo implode("", $games);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 26
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 26
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 25
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 25
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/gbLCs
function name:  (null)
number of ops:  36
compiled vars:  !0 = $arr, !1 = $game, !2 = $timeleft, !3 = $games
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   38     1      > FE_RESET_R                                       $5      !0, ->26
          2    > > FE_FETCH_R                                               $5, !1, ->26
   39     3    >   INIT_FCALL                                               'strtotime'
          4        FETCH_DIM_R                                      ~6      !1, 'attributes'
          5        FETCH_DIM_R                                      ~7      ~6, 'release-date'
          6        SEND_VAL                                                 ~7
          7        DO_ICALL                                         $8      
          8        INIT_FCALL                                               'time'
          9        DO_ICALL                                         $9      
         10        SUB                                              ~10     $8, $9
         11        ASSIGN                                                   !2, ~10
   40    12        IS_SMALLER                                               0, !2
         13      > JMPZ                                                     ~12, ->25
         14    >   INIT_FCALL                                               'floor'
         15        DIV                                              ~14     !2, 86400
         16        SEND_VAL                                                 ~14
         17        DO_ICALL                                         $15     
         18        CONCAT                                           ~16     $15, '+days+left+to+'
         19        FETCH_DIM_R                                      ~17     !1, 'attributes'
         20        FETCH_DIM_R                                      ~18     ~17, 'name'
         21        CONCAT                                           ~19     ~16, ~18
         22        CONCAT                                           ~20     ~19, '+%0A'
         23        ASSIGN_DIM                                               !3, !2
         24        OP_DATA                                                  ~20
   38    25    > > JMP                                                      ->2
         26    >   FE_FREE                                                  $5
   43    27        INIT_FCALL                                               'ksort'
         28        SEND_REF                                                 !3
         29        DO_ICALL                                                 
   44    30        INIT_FCALL                                               'implode'
         31        SEND_VAL                                                 ''
         32        SEND_VAR                                                 !3
         33        DO_ICALL                                         $22     
         34        ECHO                                                     $22
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.72 ms | 1401 KiB | 23 Q