3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name = "Avalone, Doris B. - 09-01-2014 - a00005213.exe"; $searcharr = preg_match("/^\w+/", $name, $matches); if (strlen($matches[0]) >= 4) $searchstr = substr($matches[0], 0 ,4); else $searchstr = $matches[0]; print($searchstr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/poauh
function name:  (null)
number of ops:  23
compiled vars:  !0 = $name, !1 = $searcharr, !2 = $matches, !3 = $searchstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'Avalone%2C+Doris+B.+-+09-01-2014+-+a00005213.exe'
    7     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5Cw%2B%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !2
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
   10     7        FETCH_DIM_R                                      ~7      !2, 0
          8        STRLEN                                           ~8      ~7
          9        IS_SMALLER_OR_EQUAL                                      4, ~8
         10      > JMPZ                                                     ~9, ->19
         11    >   INIT_FCALL                                               'substr'
         12        FETCH_DIM_R                                      ~10     !2, 0
         13        SEND_VAL                                                 ~10
         14        SEND_VAL                                                 0
         15        SEND_VAL                                                 4
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !3, $11
         18      > JMP                                                      ->21
   11    19    >   FETCH_DIM_R                                      ~13     !2, 0
         20        ASSIGN                                                   !3, ~13
   14    21    >   ECHO                                                     !3
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.83 ms | 1387 KiB | 17 Q