3v4l.org

run code in 300+ 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 = 67
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 67
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 67
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 67
filename:       /in/k77DG
function name:  setRegx
number of ops:  69
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, ->67
         29    > > FE_FETCH_R                                               $17, !3, ->67
   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        INIT_FCALL                                               'preg_match'
         37        SEND_VAR                                                 !0
         38        SEND_VAR                                                 !3
         39        DO_ICALL                                         $20     
         40        SEND_VAR                                                 $20
         41        SEND_VAL                                                 11
         42        DO_ICALL                                         $21     
         43        CONCAT                                           ~22     ~19, $21
         44        CONCAT                                           ~23     ~22, '+%7C+'
         45        INIT_FCALL                                               'str_pad'
         46        INIT_FCALL                                               'preg_match'
         47        SEND_VAR                                                 !1
         48        SEND_VAR                                                 !3
         49        DO_ICALL                                         $24     
         50        SEND_VAR                                                 $24
         51        SEND_VAL                                                 11
         52        DO_ICALL                                         $25     
         53        CONCAT                                           ~26     ~23, $25
         54        CONCAT                                           ~27     ~26, '+%7C+'
         55        INIT_FCALL                                               'str_pad'
         56        INIT_FCALL                                               'preg_match'
         57        SEND_VAL                                                 '%2F%5Cp%7BHangul%7D%2Fu'
         58        SEND_VAR                                                 !3
         59        DO_ICALL                                         $28     
         60        SEND_VAR                                                 $28
         61        SEND_VAL                                                 11
         62        DO_ICALL                                         $29     
         63        CONCAT                                           ~30     ~27, $29
         64        CONCAT                                           ~31     ~30, '%0A'
         65        ECHO                                                     ~31
   13    66      > JMP                                                      ->29
         67    >   FE_FREE                                                  $17
   16    68      > RETURN                                                   null

End of function setregx

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.88 ms | 1400 KiB | 17 Q