3v4l.org

run code in 300+ PHP versions simultaneously
<? $title = "ดูซีรี่ย์ฝรั่ง Arrow Season 3 Ep.1-1"; $title = strtolower($title); $pattern = array("~\s*(season)\s*(\d+[-]?[0-9]*).*\s*(?:ep[.]?|episode)\s*(\d+[-]?[0-9]*)(\s*)~", "~\s*(?:ep[.]?|episode)\s*(\d+[-]?[0-9]*)(\s*)~"); $title = preg_replace($pattern, array(" $1 $2 ep. $3"," ep. $1"), $title, -1); $title = ucwords($title); $episodename = str_replace("’","'",$title); $pttr = '/[ก-๙]/ui'; $new_str = preg_replace($pttr, '', $episodename); $new_str = preg_replace('/\s+/', ' ', $new_str); $new_str = str_replace('..', '', $new_str); $new_str = trim($new_str); $episode = $new_str; echo $episode; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PiXrd
function name:  (null)
number of ops:  49
compiled vars:  !0 = $title, !1 = $pattern, !2 = $episodename, !3 = $pttr, !4 = $new_str, !5 = $episode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%E0%B8%94%E0%B8%B9%E0%B8%8B%E0%B8%B5%E0%B8%A3%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B9%8C%E0%B8%9D%E0%B8%A3%E0%B8%B1%E0%B9%88%E0%B8%87+Arrow+Season+3+Ep.1-1'
    4     1        INIT_FCALL                                               'strtolower'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !0, $7
    5     5        ASSIGN                                                   !1, <array>
    6     6        INIT_FCALL                                               'preg_replace'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 <array>
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 -1
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !0, $10
    7    13        INIT_FCALL                                               'ucwords'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $12     
         16        ASSIGN                                                   !0, $12
    9    17        INIT_FCALL                                               'str_replace'
         18        SEND_VAL                                                 '%E2%80%99'
         19        SEND_VAL                                                 '%27'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !2, $14
   10    23        ASSIGN                                                   !3, '%2F%5B%E0%B8%81-%E0%B9%99%5D%2Fui'
   11    24        INIT_FCALL                                               'preg_replace'
         25        SEND_VAR                                                 !3
         26        SEND_VAL                                                 ''
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                         $17     
         29        ASSIGN                                                   !4, $17
   12    30        INIT_FCALL                                               'preg_replace'
         31        SEND_VAL                                                 '%2F%5Cs%2B%2F'
         32        SEND_VAL                                                 '+'
         33        SEND_VAR                                                 !4
         34        DO_ICALL                                         $19     
         35        ASSIGN                                                   !4, $19
   13    36        INIT_FCALL                                               'str_replace'
         37        SEND_VAL                                                 '..'
         38        SEND_VAL                                                 ''
         39        SEND_VAR                                                 !4
         40        DO_ICALL                                         $21     
         41        ASSIGN                                                   !4, $21
   14    42        INIT_FCALL                                               'trim'
         43        SEND_VAR                                                 !4
         44        DO_ICALL                                         $23     
         45        ASSIGN                                                   !4, $23
   15    46        ASSIGN                                                   !5, !4
   16    47        ECHO                                                     !5
   17    48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.76 ms | 1392 KiB | 23 Q