3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = <<<'TEXT' 1. Qatar 2. Qatar 3 . Cathay 4. Qatar 2 . British 3. Qantas TEXT; $output = preg_replace('/(\d+)([.\s]*)/m','$1 . ',$input); echo $output;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vSZ2q
function name:  (null)
number of ops:  9
compiled vars:  !0 = $input, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '+1.+Qatar%0A+2.+Qatar%0A+3+.+Cathay%0A+4.+Qatar%0A+2+.+British%0A+3.+Qantas++'
   11     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%5Cd%2B%29%28%5B.%5Cs%5D%2A%29%2Fm'
          3        SEND_VAL                                                 '%241+.+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
   13     7        ECHO                                                     !1
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
243.24 ms | 998 KiB | 14 Q