3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dateArray = array('2019-05-12','2019-04-02','2020-01-07','2019-11-10','2020-07-13','2019-08-15'); $dateArray = array_filter($dateArray, function($v){return strpos($v, date('Y')) !== false ? $v : '';}); echo max($dateArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eONDq
function name:  (null)
number of ops:  12
compiled vars:  !0 = $dateArray
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        INIT_FCALL                                                   'array_filter'
          2        SEND_VAR                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          4        SEND_VAL                                                     ~2
          5        DO_ICALL                                             $3      
          6        ASSIGN                                                       !0, $3
    4     7        INIT_FCALL                                                   'max'
          8        SEND_VAR                                                     !0
          9        DO_ICALL                                             $5      
         10        ECHO                                                         $5
         11      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eONDq
function name:  {closure:/in/eONDq:3}
number of ops:  12
compiled vars:  !0 = $v
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        INIT_FCALL                                                   'date'
          2        SEND_VAL                                                     'Y'
          3        DO_ICALL                                             $1      
          4        FRAMELESS_ICALL_2                strpos              ~2      !0, $1
          5        TYPE_CHECK                                      1018          ~2
          6      > JMPZ                                                         ~3, ->9
          7    >   QM_ASSIGN                                            ~4      !0
          8      > JMP                                                          ->10
          9    >   QM_ASSIGN                                            ~4      ''
         10    > > RETURN                                                       ~4
         11*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.42 ms | 2210 KiB | 16 Q