3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datas = [ '123.456', '123', '123,456', ]; foreach($datas as $index => $data){ echo "$index. ".(int)preg_match('/^\d*(?:\.[0-9]+)?$/', $data).PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 15
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/vvEMi
function name:  (null)
number of ops:  17
compiled vars:  !0 = $datas, !1 = $data, !2 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_R                                       $4      !0, ->15
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->15
          3    >   ASSIGN                                                   !2, ~5
   10     4        NOP                                                      
          5        FAST_CONCAT                                      ~7      !2, '.+'
          6        INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%2F%5E%5Cd%2A%28%3F%3A%5C.%5B0-9%5D%2B%29%3F%24%2F'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $8      
         10        CAST                                          4  ~9      $8
         11        CONCAT                                           ~10     ~7, ~9
         12        CONCAT                                           ~11     ~10, '%0A'
         13        ECHO                                                     ~11
    9    14      > JMP                                                      ->2
         15    >   FE_FREE                                                  $4
   11    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.16 ms | 1395 KiB | 15 Q