3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = '23bc'; $b = ''; $c = '123'; $cond1 = false; $cond2 = false; $test = array('a' => $a,'b' => $b, 'c' => $c); foreach ($test as $key => $str) { if( ($cond1 = strlen($str)== 0) || ($cond2 = ctype_digit($str)) ) { echo $key . ': Good to Go',"\n"; var_dump($cond1,$cond2); echo "\n"; } else { echo $key . ': Bad to Go',"\n"; var_dump($cond1,$cond2); echo "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 40
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 40
Branch analysis from position: 11
2 jumps found. (Code = 47) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 31
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 21
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/8Pchk
function name:  (null)
number of ops:  42
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $cond1, !4 = $cond2, !5 = $test, !6 = $str, !7 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '23bc'
    3     1        ASSIGN                                                       !1, ''
    4     2        ASSIGN                                                       !2, '123'
    5     3        ASSIGN                                                       !3, <false>
    6     4        ASSIGN                                                       !4, <false>
    8     5        INIT_ARRAY                                           ~13     !0, 'a'
          6        ADD_ARRAY_ELEMENT                                    ~13     !1, 'b'
          7        ADD_ARRAY_ELEMENT                                    ~13     !2, 'c'
          8        ASSIGN                                                       !5, ~13
   10     9      > FE_RESET_R                                           $15     !5, ->40
         10    > > FE_FETCH_R                                           ~16     $15, !6, ->40
         11    >   ASSIGN                                                       !7, ~16
   11    12        STRLEN                                               ~18     !6
         13        IS_EQUAL                                             ~19     ~18, 0
         14        ASSIGN                                               ~20     !3, ~19
         15      > JMPNZ_EX                                             ~20     ~20, ->21
         16    >   INIT_FCALL                                                   'ctype_digit'
         17        SEND_VAR                                                     !6
         18        DO_ICALL                                             $21     
         19        ASSIGN                                               ~22     !4, $21
         20        BOOL                                                 ~20     ~22
         21    > > JMPZ                                                         ~20, ->31
   13    22    >   CONCAT                                               ~23     !7, '%3A+Good+to+Go'
         23        ECHO                                                         ~23
         24        ECHO                                                         '%0A'
   14    25        INIT_FCALL                                                   'var_dump'
         26        SEND_VAR                                                     !3
         27        SEND_VAR                                                     !4
         28        DO_ICALL                                                     
   15    29        ECHO                                                         '%0A'
   11    30      > JMP                                                          ->39
   19    31    >   CONCAT                                               ~25     !7, '%3A+Bad+to+Go'
         32        ECHO                                                         ~25
         33        ECHO                                                         '%0A'
   20    34        INIT_FCALL                                                   'var_dump'
         35        SEND_VAR                                                     !3
         36        SEND_VAR                                                     !4
         37        DO_ICALL                                                     
   21    38        ECHO                                                         '%0A'
   10    39    > > JMP                                                          ->10
         40    >   FE_FREE                                                      $15
   23    41      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.75 ms | 2726 KiB | 15 Q