3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "abdsasdbm absdas dbasdn mda 2-01602171-63543"; $regex = "/[0-9]{1}-[0-9]{8}-[0-9]{5}/"; $result = (preg_match($regex, $string, $result)) ? $result : ""; var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6BIDo
function name:  (null)
number of ops:  16
compiled vars:  !0 = $string, !1 = $regex, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'abdsasdbm+absdas+dbasdn+mda+2-01602171-63543'
    5     1        ASSIGN                                                   !1, '%2F%5B0-9%5D%7B1%7D-%5B0-9%5D%7B8%7D-%5B0-9%5D%7B5%7D%2F'
    7     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                         $5      
          7      > JMPZ                                                     $5, ->10
          8    >   QM_ASSIGN                                        ~6      !2
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~6      ''
         11    >   ASSIGN                                                   !2, ~6
    8    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.49 ms | 1395 KiB | 17 Q