3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a='26.15'; $b='0.00'; if ($a && $b) { $discount = @round($promotion_temp * 10 / $price_temp, 2); if(empty($discount))$discount=''; $discount = "" . $discount; echo $discount; }else{ echo 'fail'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 21
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/4qQr7
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a, !1 = $b, !2 = $discount, !3 = $promotion_temp, !4 = $price_temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '26.15'
    4     1        ASSIGN                                                   !1, '0.00'
    5     2      > JMPZ_EX                                          ~7      !0, ->4
          3    >   BOOL                                             ~7      !1
          4    > > JMPZ                                                     ~7, ->21
    6     5    >   BEGIN_SILENCE                                    ~8      
          6        INIT_FCALL                                               'round'
          7        MUL                                              ~9      !3, 10
          8        DIV                                              ~10     ~9, !4
          9        SEND_VAL                                                 ~10
         10        SEND_VAL                                                 2
         11        DO_ICALL                                         $11     
         12        END_SILENCE                                              ~8
         13        ASSIGN                                                   !2, $11
    7    14        ISSET_ISEMPTY_CV                                         !2
         15      > JMPZ                                                     ~13, ->17
         16    >   ASSIGN                                                   !2, ''
    8    17    >   CONCAT                                           ~15     '', !2
         18        ASSIGN                                                   !2, ~15
    9    19        ECHO                                                     !2
         20      > JMP                                                      ->22
   11    21    >   ECHO                                                     'fail'
   12    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.14 ms | 1395 KiB | 15 Q