3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "150|google.com/|2500\n600|hello_world|1500"; if (preg_match('~\A([0-9]+\|\S*\|[0-9]+)(?:\R(?1))*\z~', $text)){ echo "Valid!"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/shdNe
function name:  (null)
number of ops:  8
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '150%7Cgoogle.com%2F%7C2500%0A600%7Chello_world%7C1500'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%7E%5CA%28%5B0-9%5D%2B%5C%7C%5CS%2A%5C%7C%5B0-9%5D%2B%29%28%3F%3A%5CR%28%3F1%29%29%2A%5Cz%7E'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->7
    5     6    >   ECHO                                                     'Valid%21'
    6     7    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.63 ms | 1009 KiB | 14 Q