3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(sprintf('%d.%d.%s-%d.%d.%d','11111','01','01','1d','','')); $a = '11111';//переполнение $b = '01'; //спереди 0 $c = '1d'; //лишние символы $d = ''; //недостаточно символов $e = 'df'; //неподходящие символы $r = array('/\d{4,1}/','/\d{2,1}/','/\d{2,1}/','/\d{2,1}/','/\d{2,1}/','/\d?/'); $i = 0; var_dump($r); echo preg_replace($r[$i++], '$0', $a).PHP_EOL; echo preg_replace($r[$i++], '$0', $b).PHP_EOL; echo preg_replace($r[$i++], '$0', $c).PHP_EOL; echo preg_replace($r[$i++], '$0', $d).PHP_EOL; echo preg_replace($r[$i++], '$0', $e).PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wavan
function name:  (null)
number of ops:  68
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d, !4 = $e, !5 = $r, !6 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'sprintf'
          2        SEND_VAL                                                 '%25d.%25d.%25s-%25d.%25d.%25d'
          3        SEND_VAL                                                 '11111'
          4        SEND_VAL                                                 '01'
          5        SEND_VAL                                                 '01'
          6        SEND_VAL                                                 '1d'
          7        SEND_VAL                                                 ''
          8        SEND_VAL                                                 ''
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
    3    12        ASSIGN                                                   !0, '11111'
    4    13        ASSIGN                                                   !1, '01'
    5    14        ASSIGN                                                   !2, '1d'
    6    15        ASSIGN                                                   !3, ''
    7    16        ASSIGN                                                   !4, 'df'
    8    17        ASSIGN                                                   !5, <array>
    9    18        ASSIGN                                                   !6, 0
   10    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !5
         21        DO_ICALL                                                 
   11    22        INIT_FCALL                                               'preg_replace'
         23        POST_INC                                         ~17     !6
         24        FETCH_DIM_R                                      ~18     !5, ~17
         25        SEND_VAL                                                 ~18
         26        SEND_VAL                                                 '%240'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $19     
         29        CONCAT                                           ~20     $19, '%0A'
         30        ECHO                                                     ~20
   12    31        INIT_FCALL                                               'preg_replace'
         32        POST_INC                                         ~21     !6
         33        FETCH_DIM_R                                      ~22     !5, ~21
         34        SEND_VAL                                                 ~22
         35        SEND_VAL                                                 '%240'
         36        SEND_VAR                                                 !1
         37        DO_ICALL                                         $23     
         38        CONCAT                                           ~24     $23, '%0A'
         39        ECHO                                                     ~24
   13    40        INIT_FCALL                                               'preg_replace'
         41        POST_INC                                         ~25     !6
         42        FETCH_DIM_R                                      ~26     !5, ~25
         43        SEND_VAL                                                 ~26
         44        SEND_VAL                                                 '%240'
         45        SEND_VAR                                                 !2
         46        DO_ICALL                                         $27     
         47        CONCAT                                           ~28     $27, '%0A'
         48        ECHO                                                     ~28
   14    49        INIT_FCALL                                               'preg_replace'
         50        POST_INC                                         ~29     !6
         51        FETCH_DIM_R                                      ~30     !5, ~29
         52        SEND_VAL                                                 ~30
         53        SEND_VAL                                                 '%240'
         54        SEND_VAR                                                 !3
         55        DO_ICALL                                         $31     
         56        CONCAT                                           ~32     $31, '%0A'
         57        ECHO                                                     ~32
   15    58        INIT_FCALL                                               'preg_replace'
         59        POST_INC                                         ~33     !6
         60        FETCH_DIM_R                                      ~34     !5, ~33
         61        SEND_VAL                                                 ~34
         62        SEND_VAL                                                 '%240'
         63        SEND_VAR                                                 !4
         64        DO_ICALL                                         $35     
         65        CONCAT                                           ~36     $35, '%0A'
         66        ECHO                                                     ~36
         67      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.03 ms | 1400 KiB | 19 Q