3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regEx = "/^[0-9]*$/"; $pass= "Y"; $fail= "N"; $value = 1; $value = 0; $value = "true"; $value = "false"; $value = true; //$value = false; //returns Y //$value = "hello"; //returns N //$value = 32452345; //returns N if ((preg_match($regEx, $value) && ($value == 1 || $value == 0)) || $value === true || $value === false) { echo $pass; } else{ echo $fail; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 47) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 21
Branch analysis from position: 17
Branch analysis from position: 18
filename:       /in/UqODR
function name:  (null)
number of ops:  29
compiled vars:  !0 = $regEx, !1 = $pass, !2 = $fail, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, '%2F%5E%5B0-9%5D%2A%24%2F'
    6     1        ASSIGN                                                   !1, 'Y'
    7     2        ASSIGN                                                   !2, 'N'
    9     3        ASSIGN                                                   !3, 1
   10     4        ASSIGN                                                   !3, 0
   11     5        ASSIGN                                                   !3, 'true'
   12     6        ASSIGN                                                   !3, 'false'
   13     7        ASSIGN                                                   !3, <true>
   18     8        INIT_FCALL                                               'preg_match'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $12     
         12      > JMPZ_EX                                          ~13     $12, ->18
         13    >   IS_EQUAL                                         ~14     !3, 1
         14      > JMPNZ_EX                                         ~14     ~14, ->17
         15    >   IS_EQUAL                                         ~15     !3, 0
         16        BOOL                                             ~14     ~15
         17    >   BOOL                                             ~13     ~14
         18    > > JMPNZ_EX                                         ~13     ~13, ->21
         19    >   TYPE_CHECK                                    8  ~16     !3
         20        BOOL                                             ~13     ~16
         21    > > JMPNZ_EX                                         ~13     ~13, ->24
         22    >   TYPE_CHECK                                    4  ~17     !3
         23        BOOL                                             ~13     ~17
         24    > > JMPZ                                                     ~13, ->27
   19    25    >   ECHO                                                     !1
         26      > JMP                                                      ->28
   22    27    >   ECHO                                                     !2
   23    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.29 ms | 1396 KiB | 15 Q