3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lines ="From: {Name|1} {Email|11} Phone / Skype: {Phone / Skype|8} removeIfEmpty Message Body: {Tell us more|9} removeIfEmpty Sender's IP: {ip} {refUTM} -- This e-mail was sent from a contact form on Software Development Company - Redwerk (http://redwerk.com)"; $pattern = "/^.*\bremoveIfEmpty\b.*$/m"; $matches = array(); preg_match_all($pattern, $lines, $matches); foreach($matches as $match) { preg_replace("/removeIfEmpty/", $match, ""); var_dump(trim($match)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 22
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 22
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/rot5i
function name:  (null)
number of ops:  24
compiled vars:  !0 = $lines, !1 = $pattern, !2 = $matches, !3 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'From%3A+%7BName%7C1%7D+%7BEmail%7C11%7D%0APhone+%2F+Skype%3A+%7BPhone+%2F+Skype%7C8%7D+removeIfEmpty%0A%0AMessage+Body%3A%0A%7BTell+us+more%7C9%7D+removeIfEmpty%0A%0ASender%27s+IP%3A+%7Bip%7D%0A%7BrefUTM%7D%0A%0A--%0AThis+e-mail+was+sent+from+a+contact+form+on+Software+Development+Company+-+Redwerk+%28http%3A%2F%2Fredwerk.com%29'
   15     1        ASSIGN                                                   !1, '%2F%5E.%2A%5CbremoveIfEmpty%5Cb.%2A%24%2Fm'
   17     2        ASSIGN                                                   !2, <array>
   18     3        INIT_FCALL                                               'preg_match_all'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !2
          7        DO_ICALL                                                 
   19     8      > FE_RESET_R                                       $8      !2, ->22
          9    > > FE_FETCH_R                                               $8, !3, ->22
   20    10    >   INIT_FCALL                                               'preg_replace'
         11        SEND_VAL                                                 '%2FremoveIfEmpty%2F'
         12        SEND_VAR                                                 !3
         13        SEND_VAL                                                 ''
         14        DO_ICALL                                                 
   21    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'trim'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                                 
   19    21      > JMP                                                      ->9
         22    >   FE_FREE                                                  $8
   22    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.92 ms | 1430 KiB | 17 Q