3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ( preg_match('/-?[\d]*\.?[\d]*/', "xxxx") ) { echo "OK: matches"; } else { echo "Bad: doesn't match"; exit(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
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: 7
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/dd2L5
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%2F-%3F%5B%5Cd%5D%2A%5C.%3F%5B%5Cd%5D%2A%2F'
          2        SEND_VAL                                                 'xxxx'
          3        DO_ICALL                                         $0      
          4      > JMPZ                                                     $0, ->7
    4     5    >   ECHO                                                     'OK%3A+matches'
          6      > JMP                                                      ->9
    6     7    >   ECHO                                                     'Bad%3A+doesn%27t+match'
    7     8      > EXIT                                                     
    8     9    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.03 ms | 1394 KiB | 15 Q