3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{:de}Hallo Welt{:}{:en}Helo world{:}'; $placeholder = '{:de}'; $lang_content = preg_replace('/(.*)'.preg_quote($placeholder).'(.*?)'.preg_quote('{:}').'(.*)/sm', '\2', $str); Echo $lang_content;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m6AGF
function name:  (null)
number of ops:  20
compiled vars:  !0 = $str, !1 = $placeholder, !2 = $lang_content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%3Ade%7DHallo+Welt%7B%3A%7D%7B%3Aen%7DHelo+world%7B%3A%7D'
    5     1        ASSIGN                                                   !1, '%7B%3Ade%7D'
    6     2        INIT_FCALL                                               'preg_replace'
          3        INIT_FCALL                                               'preg_quote'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        CONCAT                                           ~6      '%2F%28.%2A%29', $5
          7        CONCAT                                           ~7      ~6, '%28.%2A%3F%29'
          8        INIT_FCALL                                               'preg_quote'
          9        SEND_VAL                                                 '%7B%3A%7D'
         10        DO_ICALL                                         $8      
         11        CONCAT                                           ~9      ~7, $8
         12        CONCAT                                           ~10     ~9, '%28.%2A%29%2Fsm'
         13        SEND_VAL                                                 ~10
         14        SEND_VAL                                                 '%5C2'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !2, $11
    8    18        ECHO                                                     !2
    9    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.36 ms | 1006 KiB | 15 Q