3v4l.org

run code in 500+ PHP versions simultaneously
<?php // 정규표현식 패턴별 호출 setRegx('/[ㄱ-ㅣ가-힣]/', '/[ㄱ-ㅣ가-힣]/u'); setRegx('/[ㄱ-힣]/', '/[ㄱ-힣]/u'); setRegx('/[ㄱ-ㅎ]/', '/[ㄱ-ㅎ]/u'); // 결과 출력 function setRegx($sRegx1, $sRegx2) { $aString = array('Taekyun 김', 'ㅏ', 'Taekyun', 'Taekyun 金'); echo chr(10).str_pad('', 10).' | '.str_pad($sRegx1, 11).' | '.str_pad($sRegx2, 11).' | '.str_pad('/\p{Hangul}/u', 11).chr(10); foreach ($aString as $sText) { echo str_pad($sText, 10).' | '.str_pad(preg_match($sRegx1, $sText), 11).' | '.str_pad(preg_match($sRegx2, $sText), 11).' | '.str_pad(preg_match('/\p{Hangul}/u', $sText), 11).chr(10); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k77DG
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                           'setRegx'
          1        SEND_VAL_EX                                                  '%2F%5B%E3%84%B1-%E3%85%A3%EA%B0%80-%ED%9E%A3%5D%2F'
          2        SEND_VAL_EX                                                  '%2F%5B%E3%84%B1-%E3%85%A3%EA%B0%80-%ED%9E%A3%5D%2Fu'
          3        DO_FCALL                                          0          
    5     4        INIT_FCALL_BY_NAME                                           'setRegx'
          5        SEND_VAL_EX                                                  '%2F%5B%E3%84%B1-%ED%9E%A3%5D%2F'
          6        SEND_VAL_EX                                                  '%2F%5B%E3%84%B1-%ED%9E%A3%5D%2Fu'
          7        DO_FCALL                                          0          
    6     8        INIT_FCALL_BY_NAME                                           'setRegx'
          9        SEND_VAL_EX                                                  '%2F%5B%E3%84%B1-%E3%85%8E%5D%2F'
         10        SEND_VAL_EX                                                  '%2F%5B%E3%84%B1-%E3%85%8E%5D%2Fu'
         11        DO_FCALL                                          0          
   16    12      > RETURN                                                       1

Function setregx:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 29, Position 2 = 58
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 58
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
filename:       /in/k77DG
function name:  setRegx
number of ops:  60
compiled vars:  !0 = $sRegx1, !1 = $sRegx2, !2 = $aString, !3 = $sText
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   11     2        ASSIGN                                                       !2, <array>
   12     3        INIT_FCALL                                                   'str_pad'
          4        SEND_VAL                                                     ''
          5        SEND_VAL                                                     10
          6        DO_ICALL                                             $5      
          7        CONCAT                                               ~6      '%0A', $5
          8        CONCAT                                               ~7      ~6, '+%7C+'
          9        INIT_FCALL                                                   'str_pad'
         10        SEND_VAR                                                     !0
         11        SEND_VAL                                                     11
         12        DO_ICALL                                             $8      
         13        CONCAT                                               ~9      ~7, $8
         14        CONCAT                                               ~10     ~9, '+%7C+'
         15        INIT_FCALL                                                   'str_pad'
         16        SEND_VAR                                                     !1
         17        SEND_VAL                                                     11
         18        DO_ICALL                                             $11     
         19        CONCAT                                               ~12     ~10, $11
         20        CONCAT                                               ~13     ~12, '+%7C+'
         21        INIT_FCALL                                                   'str_pad'
         22        SEND_VAL                                                     '%2F%5Cp%7BHangul%7D%2Fu'
         23        SEND_VAL                                                     11
         24        DO_ICALL                                             $14     
         25        CONCAT                                               ~15     ~13, $14
         26        CONCAT                                               ~16     ~15, '%0A'
         27        ECHO                                                         ~16
   13    28      > FE_RESET_R                                           $17     !2, ->58
         29    > > FE_FETCH_R                                                   $17, !3, ->58
   14    30    >   INIT_FCALL                                                   'str_pad'
         31        SEND_VAR                                                     !3
         32        SEND_VAL                                                     10
         33        DO_ICALL                                             $18     
         34        CONCAT                                               ~19     $18, '+%7C+'
         35        INIT_FCALL                                                   'str_pad'
         36        FRAMELESS_ICALL_2                preg_match          ~20     !0, !3
         37        SEND_VAL                                                     ~20
         38        SEND_VAL                                                     11
         39        DO_ICALL                                             $21     
         40        CONCAT                                               ~22     ~19, $21
         41        CONCAT                                               ~23     ~22, '+%7C+'
         42        INIT_FCALL                                                   'str_pad'
         43        FRAMELESS_ICALL_2                preg_match          ~24     !1, !3
         44        SEND_VAL                                                     ~24
         45        SEND_VAL                                                     11
         46        DO_ICALL                                             $25     
         47        CONCAT                                               ~26     ~23, $25
         48        CONCAT                                               ~27     ~26, '+%7C+'
         49        INIT_FCALL                                                   'str_pad'
         50        FRAMELESS_ICALL_2                preg_match          ~28     '%2F%5Cp%7BHangul%7D%2Fu', !3
         51        SEND_VAL                                                     ~28
         52        SEND_VAL                                                     11
         53        DO_ICALL                                             $29     
         54        CONCAT                                               ~30     ~27, $29
         55        CONCAT                                               ~31     ~30, '%0A'
         56        ECHO                                                         ~31
   13    57      > JMP                                                          ->29
         58    >   FE_FREE                                                      $17
   16    59      > RETURN                                                       null

End of function setregx

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.53 ms | 3711 KiB | 14 Q