3v4l.org

run code in 300+ PHP versions simultaneously
<?php $float = array( 12.5, 12.000000001, 12.00000, 12, 12.41757445, 12.071774 ); foreach ($float as $i) { if (false === preg_match('/\d+.[^1-9]+/', $i)) { echo $i . PHP_EOL; echo round($i) . " match" . PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 18
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/3t1tf
function name:  (null)
number of ops:  20
compiled vars:  !0 = $float, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1      > FE_RESET_R                                       $3      !0, ->18
          2    > > FE_FETCH_R                                               $3, !1, ->18
   14     3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5Cd%2B.%5B%5E1-9%5D%2B%2F'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7        TYPE_CHECK                                    4          $4
          8      > JMPZ                                                     ~5, ->17
   15     9    >   CONCAT                                           ~6      !1, '%0A'
         10        ECHO                                                     ~6
   16    11        INIT_FCALL                                               'round'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $7      
         14        CONCAT                                           ~8      $7, '+match'
         15        CONCAT                                           ~9      ~8, '%0A'
         16        ECHO                                                     ~9
   12    17    > > JMP                                                      ->2
         18    >   FE_FREE                                                  $3
   18    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.03 ms | 1395 KiB | 17 Q