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 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 41
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 55
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 67, Position 2 = 69
Branch analysis from position: 67
1 jumps found. (Code = 42) Position 1 = 70
Branch analysis from position: 70
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 67, Position 2 = 69
Branch analysis from position: 67
Branch analysis from position: 69
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 53, Position 2 = 55
Branch analysis from position: 53
Branch analysis from position: 55
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 41
Branch analysis from position: 39
Branch analysis from position: 41
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
Branch analysis from position: 27
filename:       /in/j6YUV
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        ASSIGN                                           ~8      !2, $7
         10      > JMPZ                                                     ~8, ->13
         11    >   QM_ASSIGN                                        ~9      !2
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~9      0
         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        ASSIGN                                           ~14     !2, $13
         24      > JMPZ                                                     ~14, ->27
         25    >   QM_ASSIGN                                        ~15     !2
         26      > JMP                                                      ->28
         27    >   QM_ASSIGN                                        ~15     0
         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        ASSIGN                                           ~20     !2, $19
         38      > JMPZ                                                     ~20, ->41
         39    >   QM_ASSIGN                                        ~21     !2
         40      > JMP                                                      ->42
         41    >   QM_ASSIGN                                        ~21     0
         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        ASSIGN                                           ~26     !2, $25
         52      > JMPZ                                                     ~26, ->55
         53    >   QM_ASSIGN                                        ~27     !2
         54      > JMP                                                      ->56
         55    >   QM_ASSIGN                                        ~27     0
         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        ASSIGN                                           ~32     !2, $31
         66      > JMPZ                                                     ~32, ->69
         67    >   QM_ASSIGN                                        ~33     !2
         68      > JMP                                                      ->70
         69    >   QM_ASSIGN                                        ~33     0
         70    >   CONCAT                                           ~34     ~33, '%0A'
         71        ECHO                                                     ~34
         72      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.67 ms | 1400 KiB | 15 Q