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?/'); echo preg_replace('/\d{4,1}/', '$0', '111111').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/9RSjK
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d, !4 = $e, !5 = $r
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                                         $6      
         10        SEND_VAR                                                 $6
         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        INIT_FCALL                                               'preg_replace'
         19        SEND_VAL                                                 '%2F%5Cd%7B4%2C1%7D%2F'
         20        SEND_VAL                                                 '%240'
         21        SEND_VAL                                                 '111111'
         22        DO_ICALL                                         $14     
         23        CONCAT                                           ~15     $14, '%0A'
         24        ECHO                                                     ~15
   13    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.75 ms | 1395 KiB | 19 Q