3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numberFormatted = number_format("15.08", 2); if ( 0 === preg_match('/\d+.[^1-9]+/', $numberFormatted)) { echo round($numberFormatted); } echo $numberFormatted;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/rtZHJ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $numberFormatted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'number_format'
          1        SEND_VAL                                                 '15.08'
          2        SEND_VAL                                                 2
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    4     5        INIT_FCALL                                               'preg_match'
          6        SEND_VAL                                                 '%2F%5Cd%2B.%5B%5E1-9%5D%2B%2F'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $3      
          9        IS_IDENTICAL                                             $3, 0
         10      > JMPZ                                                     ~4, ->15
    5    11    >   INIT_FCALL                                               'round'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        ECHO                                                     $5
    8    15    >   ECHO                                                     !0
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.04 ms | 1394 KiB | 19 Q