3v4l.org

run code in 300+ 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 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eONDq
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        INIT_FCALL                                               'date'
          4        SEND_VAL                                                 'Y'
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                         $2      
          8        TYPE_CHECK                                  1018          $2
          9      > JMPZ                                                     ~3, ->12
         10    >   QM_ASSIGN                                        ~4      !0
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~4      ''
         13    > > RETURN                                                   ~4
         14*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.1 ms | 1009 KiB | 17 Q