3v4l.org

run code in 300+ PHP versions simultaneously
<?php $weight = (int) $_POST["txtWeight"]; $height = (int) $_POST["txtHeight"]; $unit = (int) $_POST["optUnit"]; $message = ""; if($unit == "metric") { $bmiCalc = $weight/($height*$height); #This Line $message = "Metric BMI: $bmiCalc"; } else { $bmiCalc = ($weight * 703)/($height * $height); $message = "Imperial BMI: $bmiCalc"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/emA1q
function name:  (null)
number of ops:  30
compiled vars:  !0 = $weight, !1 = $height, !2 = $unit, !3 = $message, !4 = $bmiCalc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_R                      global              ~5      '_POST'
          1        FETCH_DIM_R                                      ~6      ~5, 'txtWeight'
          2        CAST                                          4  ~7      ~6
          3        ASSIGN                                                   !0, ~7
    5     4        FETCH_R                      global              ~9      '_POST'
          5        FETCH_DIM_R                                      ~10     ~9, 'txtHeight'
          6        CAST                                          4  ~11     ~10
          7        ASSIGN                                                   !1, ~11
    6     8        FETCH_R                      global              ~13     '_POST'
          9        FETCH_DIM_R                                      ~14     ~13, 'optUnit'
         10        CAST                                          4  ~15     ~14
         11        ASSIGN                                                   !2, ~15
    7    12        ASSIGN                                                   !3, ''
    9    13        IS_EQUAL                                                 !2, 'metric'
         14      > JMPZ                                                     ~18, ->22
   11    15    >   MUL                                              ~19     !1, !1
         16        DIV                                              ~20     !0, ~19
         17        ASSIGN                                                   !4, ~20
   12    18        NOP                                                      
         19        FAST_CONCAT                                      ~22     'Metric+BMI%3A+', !4
         20        ASSIGN                                                   !3, ~22
         21      > JMP                                                      ->29
   16    22    >   MUL                                              ~24     !0, 703
         23        MUL                                              ~25     !1, !1
         24        DIV                                              ~26     ~24, ~25
         25        ASSIGN                                                   !4, ~26
   17    26        NOP                                                      
         27        FAST_CONCAT                                      ~28     'Imperial+BMI%3A+', !4
         28        ASSIGN                                                   !3, ~28
   18    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.03 ms | 1395 KiB | 13 Q