3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'A0000001002034'; $n = strlen($test); $incr = preg_replace_callback( '|(\d{1,2})/(\d{1,2})/(\d{4})|', function ($matches) { //return str_pad($matches[0] + 1, $n, 0, STR_PAD_LEFT); return strtolower($matches[0] + 1); }, $test ); echo $incr."\r\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HaIor
function name:  (null)
number of ops:  13
compiled vars:  !0 = $test, !1 = $n, !2 = $incr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'A0000001002034'
    4     1        STRLEN                                           ~4      !0
          2        ASSIGN                                                   !1, ~4
    6     3        INIT_FCALL                                               'preg_replace_callback'
    7     4        SEND_VAL                                                 '%7C%28%5Cd%7B1%2C2%7D%29%2F%28%5Cd%7B1%2C2%7D%29%2F%28%5Cd%7B4%7D%29%7C'
    8     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHaIor%3A8%240'
   11     6        SEND_VAL                                                 ~6
   12     7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
    6     9        ASSIGN                                                   !2, $7
   15    10        CONCAT                                           ~9      !2, '%0D%0A'
         11        ECHO                                                     ~9
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FHaIor%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HaIor
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'strtolower'
          2        FETCH_DIM_R                                      ~1      !0, 0
          3        ADD                                              ~2      ~1, 1
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
          6      > RETURN                                                   $3
   11     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FHaIor%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.82 ms | 1395 KiB | 17 Q