3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.08 ms | 1400 KiB | 17 Q