3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'sss4444dfdf', //лишние '444444', //много 'sdfsdf', //все не то '', // '4', //мало ]; $i = 0; echo($tmp = preg_filter('/^\D*(\d{2,4}).*$/', '$1', $a[$i++])? $tmp : 0).PHP_EOL; echo($tmp = preg_filter('/^\D*(\d{2,4}).*$/', '$1', $a[$i++])? $tmp : 0).PHP_EOL; echo($tmp = preg_filter('/^\D*(\d{2,4}).*$/', '$1', $a[$i++])? $tmp : 0).PHP_EOL; echo($tmp = preg_filter('/^\D*(\d{2,4}).*$/', '$1', $a[$i++])? $tmp : 0).PHP_EOL; echo($tmp = preg_filter('/^\D*(\d{2,4}).*$/', '$1', $a[$i++])? $tmp : 0).PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 54
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 66, Position 2 = 68
Branch analysis from position: 66
1 jumps found. (Code = 42) Position 1 = 69
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 68
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 66, Position 2 = 68
Branch analysis from position: 66
Branch analysis from position: 68
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 54
Branch analysis from position: 52
Branch analysis from position: 54
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
Branch analysis from position: 40
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
Branch analysis from position: 26
filename:       /in/kn2jD
function name:  (null)
number of ops:  73
compiled vars:  !0 = $a, !1 = $i, !2 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 0
   10     2        INIT_FCALL                                               'preg_filter'
          3        SEND_VAL                                                 '%2F%5E%5CD%2A%28%5Cd%7B2%2C4%7D%29.%2A%24%2F'
          4        SEND_VAL                                                 '%241'
          5        POST_INC                                         ~5      !1
          6        FETCH_DIM_R                                      ~6      !0, ~5
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                         $7      
          9      > JMPZ                                                     $7, ->12
         10    >   QM_ASSIGN                                        ~8      !2
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~8      0
         13    >   ASSIGN                                           ~9      !2, ~8
         14        CONCAT                                           ~10     ~9, '%0A'
         15        ECHO                                                     ~10
   11    16        INIT_FCALL                                               'preg_filter'
         17        SEND_VAL                                                 '%2F%5E%5CD%2A%28%5Cd%7B2%2C4%7D%29.%2A%24%2F'
         18        SEND_VAL                                                 '%241'
         19        POST_INC                                         ~11     !1
         20        FETCH_DIM_R                                      ~12     !0, ~11
         21        SEND_VAL                                                 ~12
         22        DO_ICALL                                         $13     
         23      > JMPZ                                                     $13, ->26
         24    >   QM_ASSIGN                                        ~14     !2
         25      > JMP                                                      ->27
         26    >   QM_ASSIGN                                        ~14     0
         27    >   ASSIGN                                           ~15     !2, ~14
         28        CONCAT                                           ~16     ~15, '%0A'
         29        ECHO                                                     ~16
   12    30        INIT_FCALL                                               'preg_filter'
         31        SEND_VAL                                                 '%2F%5E%5CD%2A%28%5Cd%7B2%2C4%7D%29.%2A%24%2F'
         32        SEND_VAL                                                 '%241'
         33        POST_INC                                         ~17     !1
         34        FETCH_DIM_R                                      ~18     !0, ~17
         35        SEND_VAL                                                 ~18
         36        DO_ICALL                                         $19     
         37      > JMPZ                                                     $19, ->40
         38    >   QM_ASSIGN                                        ~20     !2
         39      > JMP                                                      ->41
         40    >   QM_ASSIGN                                        ~20     0
         41    >   ASSIGN                                           ~21     !2, ~20
         42        CONCAT                                           ~22     ~21, '%0A'
         43        ECHO                                                     ~22
   13    44        INIT_FCALL                                               'preg_filter'
         45        SEND_VAL                                                 '%2F%5E%5CD%2A%28%5Cd%7B2%2C4%7D%29.%2A%24%2F'
         46        SEND_VAL                                                 '%241'
         47        POST_INC                                         ~23     !1
         48        FETCH_DIM_R                                      ~24     !0, ~23
         49        SEND_VAL                                                 ~24
         50        DO_ICALL                                         $25     
         51      > JMPZ                                                     $25, ->54
         52    >   QM_ASSIGN                                        ~26     !2
         53      > JMP                                                      ->55
         54    >   QM_ASSIGN                                        ~26     0
         55    >   ASSIGN                                           ~27     !2, ~26
         56        CONCAT                                           ~28     ~27, '%0A'
         57        ECHO                                                     ~28
   14    58        INIT_FCALL                                               'preg_filter'
         59        SEND_VAL                                                 '%2F%5E%5CD%2A%28%5Cd%7B2%2C4%7D%29.%2A%24%2F'
         60        SEND_VAL                                                 '%241'
         61        POST_INC                                         ~29     !1
         62        FETCH_DIM_R                                      ~30     !0, ~29
         63        SEND_VAL                                                 ~30
         64        DO_ICALL                                         $31     
         65      > JMPZ                                                     $31, ->68
         66    >   QM_ASSIGN                                        ~32     !2
         67      > JMP                                                      ->69
         68    >   QM_ASSIGN                                        ~32     0
         69    >   ASSIGN                                           ~33     !2, ~32
         70        CONCAT                                           ~34     ~33, '%0A'
         71        ECHO                                                     ~34
         72      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.34 ms | 1400 KiB | 15 Q