3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_monthsList = array(".01." => "января", ".02." => "февраля", ".03." => "марта", ".04." => "апреля", ".05." => "мая", ".06." => "июня", ".07." => "июля", ".08." => "августа", ".09." => "сентября", ".10." => "октября", ".11." => "ноября", ".12." => "декабря"); $currentDate = date_create(date("Y-m-d")); date_modify($currentDate, '-15 day'); $date = date_format($currentDate, 'd.m.Y'); $date = preg_replace_callback('~\.\d{2}\.~', function ($m) use ($_monthsList) { return isset($_monthsList[$m[0]]) ? " " . $_monthsList[$m[0]] . " " : $m[0]; }, $date); echo $date;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LkpSl
function name:  (null)
number of ops:  27
compiled vars:  !0 = $_monthsList, !1 = $currentDate, !2 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'date_create'
          2        INIT_FCALL                                               'date'
          3        SEND_VAL                                                 'Y-m-d'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    9     8        INIT_FCALL                                               'date_modify'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 '-15+day'
         11        DO_ICALL                                                 
   10    12        INIT_FCALL                                               'date_format'
         13        SEND_VAR                                                 !1
         14        SEND_VAL                                                 'd.m.Y'
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !2, $8
   12    17        INIT_FCALL                                               'preg_replace_callback'
         18        SEND_VAL                                                 '%7E%5C.%5Cd%7B2%7D%5C.%7E'
         19        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FLkpSl%3A12%240'
         20        BIND_LEXICAL                                             ~10, !0
   14    21        SEND_VAL                                                 ~10
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $11     
   12    24        ASSIGN                                                   !2, $11
   15    25        ECHO                                                     !2
   16    26      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FLkpSl%3A12%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
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: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LkpSl
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $m, !1 = $_monthsList
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   13     2        FETCH_DIM_R                                      ~2      !0, 0
          3        ISSET_ISEMPTY_DIM_OBJ                         0          !1, ~2
          4      > JMPZ                                                     ~3, ->11
          5    >   FETCH_DIM_R                                      ~4      !0, 0
          6        FETCH_DIM_R                                      ~5      !1, ~4
          7        CONCAT                                           ~6      '+', ~5
          8        CONCAT                                           ~7      ~6, '+'
          9        QM_ASSIGN                                        ~8      ~7
         10      > JMP                                                      ->13
         11    >   FETCH_DIM_R                                      ~9      !0, 0
         12        QM_ASSIGN                                        ~8      ~9
         13    > > RETURN                                                   ~8
   14    14*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FLkpSl%3A12%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.56 ms | 1404 KiB | 23 Q