3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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
Jump found. Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
Jump found. Position 1 = 9
Branch analysis from position: 9
Jump found. Position 1 = -2
Branch analysis from position: 7
Jump found. 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                                                     
         9    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0