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) { $value = abs($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 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/mkSfZ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $values, !1 = $value, !2 = $regexp, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
   18     1      > FE_RESET_R                                       $5      !0, ->17
          2    > > FE_FETCH_R                                               $5, !1, ->17
   20     3    >   INIT_FCALL                                               'abs'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
   22     7        ASSIGN                                                   !2, '%2F%5E%5B0-9%5D%2B%5C.%5B0-9%5D%5B0-9%5D%3F%24%2F'
   23     8        INIT_FCALL                                               'preg_match'
          9        SEND_VAR                                                 !2
         10        SEND_VAR                                                 !1
         11        SEND_REF                                                 !3
         12        DO_ICALL                                                 
   25    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
   18    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $5
   26    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.85 ms | 1395 KiB | 19 Q