3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'test'; $return = strpos($a, 't'); if (0) echo '1'; if ($return) echo '2'; if ($return === 0) echo '3'; if (strpos($a, 't')) echo '4'; if ($return === false) echo '5'; if (strpos($a, 't') === 0) echo '6'; if (strpos($a, 't') === false) echo '7'; if (strpos($a, 't') === $return) echo '8';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 29
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 43
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
Branch analysis from position: 36
Branch analysis from position: 29
Branch analysis from position: 22
Branch analysis from position: 19
Branch analysis from position: 13
Branch analysis from position: 10
Branch analysis from position: 8
filename:       /in/lA8hq
function name:  (null)
number of ops:  44
compiled vars:  !0 = $a, !1 = $return
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test'
    3     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 't'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    4     6      > JMPZ                                                     0, ->8
          7    >   ECHO                                                     '1'
    5     8    > > JMPZ                                                     !1, ->10
          9    >   ECHO                                                     '2'
    6    10    >   IS_IDENTICAL                                             !1, 0
         11      > JMPZ                                                     ~5, ->13
         12    >   ECHO                                                     '3'
    7    13    >   INIT_FCALL                                               'strpos'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 't'
         16        DO_ICALL                                         $6      
         17      > JMPZ                                                     $6, ->19
         18    >   ECHO                                                     '4'
    8    19    >   TYPE_CHECK                                    4          !1
         20      > JMPZ                                                     ~7, ->22
         21    >   ECHO                                                     '5'
    9    22    >   INIT_FCALL                                               'strpos'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 't'
         25        DO_ICALL                                         $8      
         26        IS_IDENTICAL                                             $8, 0
         27      > JMPZ                                                     ~9, ->29
         28    >   ECHO                                                     '6'
   10    29    >   INIT_FCALL                                               'strpos'
         30        SEND_VAR                                                 !0
         31        SEND_VAL                                                 't'
         32        DO_ICALL                                         $10     
         33        TYPE_CHECK                                    4          $10
         34      > JMPZ                                                     ~11, ->36
         35    >   ECHO                                                     '7'
   11    36    >   INIT_FCALL                                               'strpos'
         37        SEND_VAR                                                 !0
         38        SEND_VAL                                                 't'
         39        DO_ICALL                                         $12     
         40        IS_IDENTICAL                                             !1, $12
         41      > JMPZ                                                     ~13, ->43
         42    >   ECHO                                                     '8'
         43    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.75 ms | 1400 KiB | 15 Q