3v4l.org

run code in 500+ PHP versions simultaneously
<?php $isSubmitted = true; $_POST['squareFoot'] = 500.5; $squareFoot = $_POST['squareFoot']; $squareFoot = filter_var($squareFoot, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); $squareFoot = filter_var($squareFoot, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_THOUSAND); $squareFoot = filter_var($squareFoot, FILTER_SANITIZE_SPECIAL_CHARS); echo $squareFoot; echo "\n"; if(!is_numeric($squareFoot)){ $isValid = false; $squareFootError = "Please enter a numeric value"; } else if(empty($squareFoot)){ $isValid = false; $squareFootError = "Please enter a numeric value"; } else if($squareFoot < 200){ $isValid = false; $squareFootError = "Please enter a number between 200 and 500,000"; } else if($squareFoot > 500000){ $isValid = false; $squareFootError = "Please enter a number between 200 and 500,000"; } else{ $squareFootFormat = number_format($squareFoot, 0, '', ','); } echo $squareFootFormat;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 37
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 42
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 47
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/663OQ
function name:  (null)
number of ops:  56
compiled vars:  !0 = $isSubmitted, !1 = $squareFoot, !2 = $isValid, !3 = $squareFootError, !4 = $squareFootFormat
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <true>
    5     1        FETCH_W                          global              $6      '_POST'
          2        ASSIGN_DIM                                                   $6, 'squareFoot'
          3        OP_DATA                                                      500.5
    6     4        FETCH_R                          global              ~8      '_POST'
          5        FETCH_DIM_R                                          ~9      ~8, 'squareFoot'
          6        ASSIGN                                                       !1, ~9
    7     7        INIT_FCALL                                                   'filter_var'
          8        SEND_VAR                                                     !1
          9        SEND_VAL                                                     520
         10        SEND_VAL                                                     4096
         11        DO_ICALL                                             $11     
         12        ASSIGN                                                       !1, $11
    8    13        INIT_FCALL                                                   'filter_var'
         14        SEND_VAR                                                     !1
         15        SEND_VAL                                                     520
         16        SEND_VAL                                                     8192
         17        DO_ICALL                                             $13     
         18        ASSIGN                                                       !1, $13
    9    19        INIT_FCALL                                                   'filter_var'
         20        SEND_VAR                                                     !1
         21        SEND_VAL                                                     515
         22        DO_ICALL                                             $15     
         23        ASSIGN                                                       !1, $15
   11    24        ECHO                                                         !1
   12    25        ECHO                                                         '%0A'
   14    26        FRAMELESS_ICALL_1                is_numeric          ~17     !1
         27        BOOL_NOT                                             ~18     ~17
         28      > JMPZ                                                         ~18, ->32
   15    29    >   ASSIGN                                                       !2, <false>
   16    30        ASSIGN                                                       !3, 'Please+enter+a+numeric+value'
   14    31      > JMP                                                          ->54
   19    32    >   ISSET_ISEMPTY_CV                                             !1
         33      > JMPZ                                                         ~21, ->37
   20    34    >   ASSIGN                                                       !2, <false>
   21    35        ASSIGN                                                       !3, 'Please+enter+a+numeric+value'
   19    36      > JMP                                                          ->54
   24    37    >   IS_SMALLER                                                   !1, 200
         38      > JMPZ                                                         ~24, ->42
   25    39    >   ASSIGN                                                       !2, <false>
   26    40        ASSIGN                                                       !3, 'Please+enter+a+number+between+200+and+500%2C000'
   24    41      > JMP                                                          ->54
   29    42    >   IS_SMALLER                                                   500000, !1
         43      > JMPZ                                                         ~27, ->47
   30    44    >   ASSIGN                                                       !2, <false>
   31    45        ASSIGN                                                       !3, 'Please+enter+a+number+between+200+and+500%2C000'
   29    46      > JMP                                                          ->54
   35    47    >   INIT_FCALL                                                   'number_format'
         48        SEND_VAR                                                     !1
         49        SEND_VAL                                                     0
         50        SEND_VAL                                                     ''
         51        SEND_VAL                                                     '%2C'
         52        DO_ICALL                                             $30     
         53        ASSIGN                                                       !4, $30
   37    54    >   ECHO                                                         !4
         55      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
177.78 ms | 2190 KiB | 17 Q