3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var1 = "Cookie Dough"; $var2 = "Vanilla"; $initial = "C"; echo stripos($var1, "C"); echo stripos($var2, "C"); if (stripos($var1,$initial) == 0 && stripos($var2,$initial) == 0) { echo $var1 . " and " . $var2 . " both start with " . $initial . "."; } else { echo "Either " . $var1 . " or " . $var2 . " doesn't start with " . $initial . "; maybe neither of them do."; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 33
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/eTcll
function name:  (null)
number of ops:  41
compiled vars:  !0 = $var1, !1 = $var2, !2 = $initial
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Cookie+Dough'
    4     1        ASSIGN                                                   !1, 'Vanilla'
    5     2        ASSIGN                                                   !2, 'C'
    7     3        INIT_FCALL                                               'stripos'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 'C'
          6        DO_ICALL                                         $6      
          7        ECHO                                                     $6
    8     8        INIT_FCALL                                               'stripos'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 'C'
         11        DO_ICALL                                         $7      
         12        ECHO                                                     $7
   10    13        INIT_FCALL                                               'stripos'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $8      
         17        IS_EQUAL                                         ~9      $8, 0
         18      > JMPZ_EX                                          ~9      ~9, ->25
         19    >   INIT_FCALL                                               'stripos'
         20        SEND_VAR                                                 !1
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $10     
         23        IS_EQUAL                                         ~11     $10, 0
         24        BOOL                                             ~9      ~11
         25    > > JMPZ                                                     ~9, ->33
   12    26    >   CONCAT                                           ~12     !0, '+and+'
         27        CONCAT                                           ~13     ~12, !1
         28        CONCAT                                           ~14     ~13, '+both+start+with+'
         29        CONCAT                                           ~15     ~14, !2
         30        CONCAT                                           ~16     ~15, '.'
         31        ECHO                                                     ~16
         32      > JMP                                                      ->40
   16    33    >   CONCAT                                           ~17     'Either+', !0
         34        CONCAT                                           ~18     ~17, '+or+'
         35        CONCAT                                           ~19     ~18, !1
         36        CONCAT                                           ~20     ~19, '+doesn%27t+start+with+'
         37        CONCAT                                           ~21     ~20, !2
         38        CONCAT                                           ~22     ~21, '%3B+maybe+neither+of+them+do.'
         39        ECHO                                                     ~22
   20    40    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.14 ms | 1405 KiB | 15 Q