3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "May Hello May", "Jun Hello12", "Jul 3", "Jun Hello13", "Jun Hello14" ]; var_export( preg_replace_callback( '/^[A-Z][a-z]{2}\b/', function($m) { static $trans = []; if (!isset($trans[$m[0]])) { echo "Push date translation element for {$m[0]}\n"; $trans[$m[0]] = date('m', strtotime($m[0])); } return $trans[$m[0]]; }, $arr ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M4JkP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'var_export'
   13     2        INIT_FCALL                                               'preg_replace_callback'
   14     3        SEND_VAL                                                 '%2F%5E%5BA-Z%5D%5Ba-z%5D%7B2%7D%5Cb%2F'
   15     4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   22     5        SEND_VAL                                                 ~2
   23     6        SEND_VAR                                                 !0
   13     7        DO_ICALL                                         $3      
   23     8        SEND_VAR                                                 $3
   12     9        DO_ICALL                                                 
   25    10      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 22
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/M4JkP
function name:  {closure}
number of ops:  26
compiled vars:  !0 = $m, !1 = $trans
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        BIND_STATIC                                              !1
   17     2        FETCH_DIM_R                                      ~2      !0, 0
          3        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      !1, ~2
          4        BOOL_NOT                                         ~4      ~3
          5      > JMPZ                                                     ~4, ->22
   18     6    >   ROPE_INIT                                     3  ~7      'Push+date+translation+element+for+'
          7        FETCH_DIM_R                                      ~5      !0, 0
          8        ROPE_ADD                                      1  ~7      ~7, ~5
          9        ROPE_END                                      2  ~6      ~7, '%0A'
         10        ECHO                                                     ~6
   19    11        FETCH_DIM_R                                      ~9      !0, 0
         12        INIT_FCALL                                               'date'
         13        SEND_VAL                                                 'm'
         14        INIT_FCALL                                               'strtotime'
         15        FETCH_DIM_R                                      ~11     !0, 0
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                         $12     
         18        SEND_VAR                                                 $12
         19        DO_ICALL                                         $13     
         20        ASSIGN_DIM                                               !1, ~9
         21        OP_DATA                                                  $13
   21    22    >   FETCH_DIM_R                                      ~14     !0, 0
         23        FETCH_DIM_R                                      ~15     !1, ~14
         24      > RETURN                                                   ~15
   22    25*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.13 ms | 1006 KiB | 17 Q