3v4l.org

run code in 300+ PHP versions simultaneously
<?php $health = 20; $finalDamage = 19.2; $healthRemaining = $health - $finalDamage; echo "Health Remaining: $healthRemaining", PHP_EOL; $compensation = $healthRemaining - 1; echo "Compensation: $compensation", PHP_EOL; if($compensation < 0){ echo "Compensated!"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/fT4v0
function name:  (null)
number of ops:  18
compiled vars:  !0 = $health, !1 = $finalDamage, !2 = $healthRemaining, !3 = $compensation
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 20
    4     1        ASSIGN                                                   !1, 19.2
    5     2        SUB                                              ~6      !0, !1
          3        ASSIGN                                                   !2, ~6
    6     4        NOP                                                      
          5        FAST_CONCAT                                      ~8      'Health+Remaining%3A+', !2
          6        ECHO                                                     ~8
          7        ECHO                                                     '%0A'
    7     8        SUB                                              ~9      !2, 1
          9        ASSIGN                                                   !3, ~9
    8    10        NOP                                                      
         11        FAST_CONCAT                                      ~11     'Compensation%3A+', !3
         12        ECHO                                                     ~11
         13        ECHO                                                     '%0A'
    9    14        IS_SMALLER                                               !3, 0
         15      > JMPZ                                                     ~12, ->17
   10    16    >   ECHO                                                     'Compensated%21'
   11    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.87 ms | 1007 KiB | 13 Q