3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array ( 'AZ' => array ( 1 => '2020-01', 2 => '2020-02' ), 'BY' => array ( 0 => '2020-03', 1 => '2020-04' ), 'CX' => array ( 1 => '2020-05', 2 => '2020-06', 3 => '2020-07' ), 'DW' => array ( 106 => '2019-01', 107 => '2019-02', 108 => '2019-03' ) ); array_walk_recursive($array, function (&$v) { $v = preg_replace('/^(\d{4})-\d\d$/', '$1', $v); }); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E5Neh
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   28     1        INIT_FCALL                                                   'array_walk_recursive'
          2        SEND_REF                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   30     4        SEND_VAL                                                     ~2
   28     5        DO_ICALL                                                     
   32     6        INIT_FCALL                                                   'print_r'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                                     
          9      > 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/E5Neh
function name:  {closure:/in/E5Neh:28}
number of ops:  5
compiled vars:  !0 = $v
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   28     0  E >   RECV                                                 !0      
   29     1        FRAMELESS_ICALL_3                preg_replace        ~1      '%2F%5E%28%5Cd%7B4%7D%29-%5Cd%5Cd%24%2F', '%241'
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !0, ~1
   30     4      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.63 ms | 2193 KiB | 15 Q