3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.62 ms | 1394 KiB | 13 Q