3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{Feel free to|Twenty-four hours a day|Do|Then|You can} stop on by, or {contact us|e mail us|call us|e-mail us|email us} about {your needs|your requirements|your preferences|the needs you have|your family needs}. {We look forward|Good quality} to {hearing from|talking with|listening to|meeting up with} you!'; echo preg_replace('/([^{}]*){[^|]+\|([^|}]+).*?}/', '$1$2', $str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K1Ceb
function name:  (null)
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7BFeel+free+to%7CTwenty-four+hours+a+day%7CDo%7CThen%7CYou+can%7D+stop+on+by%2C+or+%7Bcontact+us%7Ce+mail+us%7Ccall+us%7Ce-mail+us%7Cemail+us%7D+about+%7Byour+needs%7Cyour+requirements%7Cyour+preferences%7Cthe+needs+you+have%7Cyour+family+needs%7D.+%7BWe+look+forward%7CGood+quality%7D+to+%7Bhearing+from%7Ctalking+with%7Clistening+to%7Cmeeting+up+with%7D+you%21'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%5B%5E%7B%7D%5D%2A%29%7B%5B%5E%7C%5D%2B%5C%7C%28%5B%5E%7C%7D%5D%2B%29.%2A%3F%7D%2F'
          3        SEND_VAL                                                 '%241%242'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.43 ms | 1394 KiB | 15 Q