3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = [ 'PO/2022/0001', 'abc', 'xyz', 'PO2022/0001', 'XY/2022/0002', 'PO/2022/0232' ]; var_export( preg_filter( '~^[^/]+\K(?:/[^/]+){2}$~', '', $code ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NjX8q
function name:  (null)
number of ops:  10
compiled vars:  !0 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'var_export'
   13     2        INIT_FCALL                                               'preg_filter'
   14     3        SEND_VAL                                                 '%7E%5E%5B%5E%2F%5D%2B%5CK%28%3F%3A%2F%5B%5E%2F%5D%2B%29%7B2%7D%24%7E'
   15     4        SEND_VAL                                                 ''
   16     5        SEND_VAR                                                 !0
   13     6        DO_ICALL                                         $2      
   16     7        SEND_VAR                                                 $2
   12     8        DO_ICALL                                                 
   18     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
253.28 ms | 999 KiB | 15 Q