3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<EOD PRD Hervey Bay 07 2525 1919 RG Sprake &amp; Co Maryborough 4141 2424 Owner Robert - 0429 966 391 Owner Maureen - 07 8888 4444 - 0422000 111 Owner Wayne - 0430 555 666 Builder Scott - 0444 555 777 EOD; preg_match_all('/^(Owner |Builder )?(.*?)(?=-| \d)[- ]+(.*)$/m', $text, $matches); array_walk($matches[3], function (&$v) { $v = preg_replace('/[^\d]/', '', $v); }); print_r($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5tI5b
function name:  (null)
number of ops:  16
compiled vars:  !0 = $text, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'PRD+Hervey+Bay+07+2525+1919%0ARG+Sprake+%26amp%3B+Co+Maryborough+4141+2424%0AOwner+Robert+-+0429+966+391%0AOwner+Maureen+-+07+8888+4444+-+0422000+111%0AOwner+Wayne+-+0430+555+666%0ABuilder+Scott+-+0444+555+777'
   10     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%5E%28Owner+%7CBuilder+%29%3F%28.%2A%3F%29%28%3F%3D-%7C+%5Cd%29%5B-+%5D%2B%28.%2A%29%24%2Fm'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
   11     6        INIT_FCALL                                               'array_walk'
          7        FETCH_DIM_W                                      $4      !1, 3
          8        SEND_REF                                                 $4
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5tI5b%3A11%240'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
   12    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5tI5b%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5tI5b
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5B%5E%5Cd%5D%2F'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        ASSIGN                                                   !0, $1
          7      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5tI5b%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.7 ms | 1401 KiB | 21 Q