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?/'); $i = 0; var_dump($r); echo preg_replace('/\d{4,1}/', '$0', $a).PHP_EOL; echo preg_replace($r[1], '$0', $b).PHP_EOL; echo preg_replace($r[1], '$0', $c).PHP_EOL; echo preg_replace($r[2], '$0', $d).PHP_EOL; echo preg_replace($r[1], '$0', $e).PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mYlVd
function name:  (null)
number of ops:  62
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        SEND_VAL                                                 '%2F%5Cd%7B4%2C1%7D%2F'
         24        SEND_VAL                                                 '%240'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $17     
         27        CONCAT                                           ~18     $17, '%0A'
         28        ECHO                                                     ~18
   12    29        INIT_FCALL                                               'preg_replace'
         30        FETCH_DIM_R                                      ~19     !5, 1
         31        SEND_VAL                                                 ~19
         32        SEND_VAL                                                 '%240'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $20     
         35        CONCAT                                           ~21     $20, '%0A'
         36        ECHO                                                     ~21
   13    37        INIT_FCALL                                               'preg_replace'
         38        FETCH_DIM_R                                      ~22     !5, 1
         39        SEND_VAL                                                 ~22
         40        SEND_VAL                                                 '%240'
         41        SEND_VAR                                                 !2
         42        DO_ICALL                                         $23     
         43        CONCAT                                           ~24     $23, '%0A'
         44        ECHO                                                     ~24
   14    45        INIT_FCALL                                               'preg_replace'
         46        FETCH_DIM_R                                      ~25     !5, 2
         47        SEND_VAL                                                 ~25
         48        SEND_VAL                                                 '%240'
         49        SEND_VAR                                                 !3
         50        DO_ICALL                                         $26     
         51        CONCAT                                           ~27     $26, '%0A'
         52        ECHO                                                     ~27
   15    53        INIT_FCALL                                               'preg_replace'
         54        FETCH_DIM_R                                      ~28     !5, 1
         55        SEND_VAL                                                 ~28
         56        SEND_VAL                                                 '%240'
         57        SEND_VAR                                                 !4
         58        DO_ICALL                                         $29     
         59        CONCAT                                           ~30     $29, '%0A'
         60        ECHO                                                     ~30
         61      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.55 ms | 1400 KiB | 19 Q