3v4l.org

run code in 500+ PHP versions simultaneously
<?php function isZeroAmount(float $value, float $epsilon): bool { return $value < $epsilon; } $amount = 0.0031415; if (isZeroAmount($amount, 0.01)) { echo 'Zero amount'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/7h4L7
function name:  (null)
number of ops:  8
compiled vars:  !0 = $amount
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                       !0, 0.0031415
    9     1        INIT_FCALL                                                   'iszeroamount'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     0.01
          4        DO_FCALL                                          0  $2      
          5      > JMPZ                                                         $2, ->7
   10     6    >   ECHO                                                         'Zero+amount'
   11     7    > > RETURN                                                       1

Function iszeroamount:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7h4L7
function name:  isZeroAmount
number of ops:  7
compiled vars:  !0 = $value, !1 = $epsilon
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    4     2        IS_SMALLER                                           ~2      !0, !1
          3        VERIFY_RETURN_TYPE                                           ~2
          4      > RETURN                                                       ~2
    5     5*       VERIFY_RETURN_TYPE                                           
          6*     > RETURN                                                       null

End of function iszeroamount

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.71 ms | 1875 KiB | 14 Q