3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "foo*arbaz*luj*abaz*lewis*bazbazlewbaz"; if (strpos($string, "foo") === 0 ) { echo substr_count($string, "*"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/fjZN1
function name:  (null)
number of ops:  10
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'foo%2Aarbaz%2Aluj%2Aabaz%2Alewis%2Abazbazlewbaz'
    4     1        FRAMELESS_ICALL_2                strpos              ~2      !0, 'foo'
          2        IS_IDENTICAL                                                 ~2, 0
          3      > JMPZ                                                         ~3, ->9
    5     4    >   INIT_FCALL                                                   'substr_count'
          5        SEND_VAR                                                     !0
          6        SEND_VAL                                                     '%2A'
          7        DO_ICALL                                             $4      
          8        ECHO                                                         $4
    6     9    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.85 ms | 476 KiB | 8 Q