3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "this is sachinĂ¹s school of sachin"; $pattern = "sach"; if(preg_match("/[^ [:punct:]]*".$pattern."([^ [:punct:]]*)/", $a, $match)) print(mb_strlen($match[1])); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/sNk7Z
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $pattern, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'this+is+sachin%C3%B9s+school+of+sachin'
    3     1        ASSIGN                                                   !1, 'sach'
    4     2        INIT_FCALL                                               'preg_match'
          3        CONCAT                                           ~5      '%2F%5B%5E+%5B%3Apunct%3A%5D%5D%2A', !1
          4        CONCAT                                           ~6      ~5, '%28%5B%5E+%5B%3Apunct%3A%5D%5D%2A%29%2F'
          5        SEND_VAL                                                 ~6
          6        SEND_VAR                                                 !0
          7        SEND_REF                                                 !2
          8        DO_ICALL                                         $7      
          9      > JMPZ                                                     $7, ->15
    5    10    >   INIT_FCALL                                               'mb_strlen'
         11        FETCH_DIM_R                                      ~8      !2, 1
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                         $9      
         14        ECHO                                                     $9
    6    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.28 ms | 1386 KiB | 17 Q