3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '~(?:(?:(?:\+|00)32\h?(?:\(0\)\h?)?|0)(?:4(?:60|[789]\d)/?(?:\h?\d{2}\.?){2}\h?\d{2}|(?:\d/?\h?\d{3}|\d{2}[/-]?\h?\d{2})(?:\.?\h?\d{2}){2}))(?!\S)~'; $str = 'OK 01/07 - 31/07 OK 0487207339 OK +32487207339 OK 01.07.2016 OK +32 (0)16 89 44 77 OK 016894477 OK 003216894477 OK +3216894477 OK 016/89.44.77 OK +32 16894477 OK 0032 16894477 OK +32 16/894477 NOK +32 16-894477 (this should match) OK 0479/878810 NOK 20150211-0001731015-1 (this shouldn\'t match)'; preg_match_all($re, $str, $matches); print_r($matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0gLhn
function name:  (null)
number of ops:  12
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7E%28%3F%3A%28%3F%3A%28%3F%3A%5C%2B%7C00%2932%5Ch%3F%28%3F%3A%5C%280%5C%29%5Ch%3F%29%3F%7C0%29%28%3F%3A4%28%3F%3A60%7C%5B789%5D%5Cd%29%2F%3F%28%3F%3A%5Ch%3F%5Cd%7B2%7D%5C.%3F%29%7B2%7D%5Ch%3F%5Cd%7B2%7D%7C%28%3F%3A%5Cd%2F%3F%5Ch%3F%5Cd%7B3%7D%7C%5Cd%7B2%7D%5B%2F-%5D%3F%5Ch%3F%5Cd%7B2%7D%29%28%3F%3A%5C.%3F%5Ch%3F%5Cd%7B2%7D%29%7B2%7D%29%29%28%3F%21%5CS%29%7E'
    4     1        ASSIGN                                                   !1, 'OK+01%2F07+-+31%2F07++%0AOK+0487207339%0AOK+%2B32487207339%0AOK+01.07.2016%0AOK+%2B32+%280%2916+89+44+77%0AOK+016894477%0AOK+003216894477%0AOK+%2B3216894477%0AOK+016%2F89.44.77%0AOK+%2B32+16894477%0AOK+0032+16894477%0AOK+%2B32+16%2F894477%0ANOK+%2B32+16-894477+%28this+should+match%29%0AOK+0479%2F878810%0ANOK+20150211-0001731015-1+%28this+shouldn%27t+match%29'
   20     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
   22     7        INIT_FCALL                                               'print_r'
          8        FETCH_DIM_R                                      ~6      !2, 0
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.29 ms | 1002 KiB | 15 Q