3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "shot this dude for being a mother"; $bads = array('truck', 'shot'); foreach($bads as $bad) { $place = strpos($string, $bad); if (!empty($place)) { echo 'Bad word'; exit; } else { echo "Good"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/tG67U
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $bads, !2 = $bad, !3 = $place
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'shot+this+dude+for+being+a+mother'
    4     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $6      !1, ->17
          3    > > FE_FETCH_R                                               $6, !2, ->17
    6     4    >   INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    7     9        ISSET_ISEMPTY_CV                                 ~9      !3
         10        BOOL_NOT                                         ~10     ~9
         11      > JMPZ                                                     ~10, ->15
    8    12    >   ECHO                                                     'Bad+word'
    9    13      > EXIT                                                     
    7    14*       JMP                                                      ->16
   11    15    >   ECHO                                                     'Good'
    5    16      > JMP                                                      ->3
         17    >   FE_FREE                                                  $6
   13    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.67 ms | 1080 KiB | 14 Q