3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'F7998FM3213/02F', 'J442554NM/05', 'K439459845/34D', 'FOO007/1A2B3CD45EFG6', ]; var_export( preg_replace( '#(?:[^/]*/|\G(?!^))\d*\K\D+#', '', $strings ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lBgtf
function name:  (null)
number of ops:  10
compiled vars:  !0 = $strings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'var_export'
   12     2        INIT_FCALL                                               'preg_replace'
   13     3        SEND_VAL                                                 '%23%28%3F%3A%5B%5E%2F%5D%2A%2F%7C%5CG%28%3F%21%5E%29%29%5Cd%2A%5CK%5CD%2B%23'
   14     4        SEND_VAL                                                 ''
   15     5        SEND_VAR                                                 !0
   12     6        DO_ICALL                                         $2      
   15     7        SEND_VAR                                                 $2
   11     8        DO_ICALL                                                 
   17     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.65 ms | 997 KiB | 15 Q