3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '["P4950Zp550","P4950Zp575","P4950Zp600","P5000Zp550","P5000Zp575","P5000Zp600","P4975Zp550","P4975Zp600"]'; if (preg_match('~^\["[PM]\d{3,5}Z[pm]\d{3,5}(?:","[PM]\d{3,5}Z[pm]\d{3,5}){7}"]$~', $string)) { echo "pass"; } else { echo "fail"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LEZPa
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%5B%22P4950Zp550%22%2C%22P4950Zp575%22%2C%22P4950Zp600%22%2C%22P5000Zp550%22%2C%22P5000Zp575%22%2C%22P5000Zp600%22%2C%22P4975Zp550%22%2C%22P4975Zp600%22%5D'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%7E%5E%5C%5B%22%5BPM%5D%5Cd%7B3%2C5%7DZ%5Bpm%5D%5Cd%7B3%2C5%7D%28%3F%3A%22%2C%22%5BPM%5D%5Cd%7B3%2C5%7DZ%5Bpm%5D%5Cd%7B3%2C5%7D%29%7B7%7D%22%5D%24%7E'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->8
    5     6    >   ECHO                                                     'pass'
    4     7      > JMP                                                      ->9
    7     8    >   ECHO                                                     'fail'
    8     9    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.15 ms | 1009 KiB | 14 Q