3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'test'; $return = strpos($a, 't'); echo "\n"; if (0) echo 'true'; echo "\n"; if ($return) echo 'true'; echo "\n"; if (strpos($a, 't')) echo 'true'; echo "\n"; if ($return === 0) echo 'true'; echo "\n"; if (strpos($a, 't') === 0) echo 'true'; echo "\n"; if (strpos($a, 't') === $return) echo 'true';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 39
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 31
Branch analysis from position: 23
Branch analysis from position: 19
Branch analysis from position: 12
Branch analysis from position: 9
filename:       /in/SJ8CI
function name:  (null)
number of ops:  40
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        ECHO                                                     '%0A'
    5     7      > JMPZ                                                     0, ->9
          8    >   ECHO                                                     'true'
    6     9    >   ECHO                                                     '%0A'
    7    10      > JMPZ                                                     !1, ->12
         11    >   ECHO                                                     'true'
    8    12    >   ECHO                                                     '%0A'
    9    13        INIT_FCALL                                               'strpos'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 't'
         16        DO_ICALL                                         $5      
         17      > JMPZ                                                     $5, ->19
         18    >   ECHO                                                     'true'
   10    19    >   ECHO                                                     '%0A'
   11    20        IS_IDENTICAL                                             !1, 0
         21      > JMPZ                                                     ~6, ->23
         22    >   ECHO                                                     'true'
   12    23    >   ECHO                                                     '%0A'
   13    24        INIT_FCALL                                               'strpos'
         25        SEND_VAR                                                 !0
         26        SEND_VAL                                                 't'
         27        DO_ICALL                                         $7      
         28        IS_IDENTICAL                                             $7, 0
         29      > JMPZ                                                     ~8, ->31
         30    >   ECHO                                                     'true'
   14    31    >   ECHO                                                     '%0A'
   15    32        INIT_FCALL                                               'strpos'
         33        SEND_VAR                                                 !0
         34        SEND_VAL                                                 't'
         35        DO_ICALL                                         $9      
         36        IS_IDENTICAL                                             !1, $9
         37      > JMPZ                                                     ~10, ->39
         38    >   ECHO                                                     'true'
         39    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.78 ms | 1405 KiB | 15 Q