3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '1234@#$ABCFG3478&*'; if (preg_match('/[a-z]/i', $string, $match)) { $firstLetter = $match[0]; } else { // there's no letters in string } echo $firstLetter;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/Xct87
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string, !1 = $match, !2 = $firstLetter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '1234%40%23%24ABCFG3478%26%2A'
    3     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5Ba-z%5D%2Fi'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $4      
          6      > JMPZ                                                     $4, ->10
    4     7    >   FETCH_DIM_R                                      ~5      !1, 0
          8        ASSIGN                                                   !2, ~5
          9      > JMP                                                      ->10
    9    10    >   ECHO                                                     !2
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.12 ms | 1394 KiB | 15 Q