3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array ( 0 => array ( 'values' => array ( 1 => '123456', 2 => 'Blue', 3 => 'Container', 4 => '03-01-2020', // start date 5 => '03-01-2021', // exp date 6 => '', 7 => '', ), ), 1 => array ( 'values' => array ( 1 => '21312', 2 => 'Green', 3 => 'Box', 4 => '2019-04-12', // start date 5 => '', //exp date 6 => '', 7 => '', ), ), 2 => array ( 'values' => array ( 1 => '434324', 2 => 'Orange', 3 => 'Box', 4 => '2018-04-28', // start date 5 => '2019-04-23', // exp date 6 => '', 7 => '', ), ), ); $expiryDates = array_map(static function ($entry) { return strtotime($entry['values'][5]); }, $input); echo date('d F Y', max($expiryDates));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AiFtA
function name:  (null)
number of ops:  16
compiled vars:  !0 = $input, !1 = $expiryDates
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   44     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
   46     3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
   44     5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   48     7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'd+F+Y'
          9        INIT_FCALL                                               'max'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                         $7      
         14        ECHO                                                     $7
         15      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AiFtA
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $entry
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   RECV                                             !0      
   45     1        INIT_FCALL                                               'strtotime'
          2        FETCH_DIM_R                                      ~1      !0, 'values'
          3        FETCH_DIM_R                                      ~2      ~1, 5
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
          6      > RETURN                                                   $3
   46     7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.79 ms | 1001 KiB | 17 Q