3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array( 0, 1, '1', 1.00, 1.01, 2.33, 3.445 -3.45 ); foreach($values as $value) { $regexp = '/^(-)?[0-9]+\.[0-9][0-9]?$/'; preg_match($regexp, $value, $matches); var_dump($matches); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 13
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/di5ht
function name:  (null)
number of ops:  15
compiled vars:  !0 = $values, !1 = $value, !2 = $regexp, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   13     1      > FE_RESET_R                                       $5      !0, ->13
          2    > > FE_FETCH_R                                               $5, !1, ->13
   14     3    >   ASSIGN                                                   !2, '%2F%5E%28-%29%3F%5B0-9%5D%2B%5C.%5B0-9%5D%5B0-9%5D%3F%24%2F'
   15     4        INIT_FCALL                                               'preg_match'
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !1
          7        SEND_REF                                                 !3
          8        DO_ICALL                                                 
   17     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                                 
   13    12      > JMP                                                      ->2
         13    >   FE_FREE                                                  $5
   18    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.12 ms | 1394 KiB | 17 Q