3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "Subject: Update on Your Ticket: ID {{ random_number }} Body: Hello, Your ticket has been recently updated on {{ date }}. We kindly request you to review and acknowledge the changes made. If you have any further updates or queries regarding your ticket, please don't hesitate to respond to this email. Best Regards, {{ sender_name }}"; $parts = explode('Body:', $string); $subject = trim(str_replace('Subject:', '', $parts[0])); $body = trim($parts[1]); echo 'Subject = "'.$subject.'"'; echo PHP_EOL.PHP_EOL; echo 'Body = "'.$body.'"';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2UrsM
function name:  (null)
number of ops:  22
compiled vars:  !0 = $string, !1 = $parts, !2 = $subject, !3 = $body
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Subject%3A%0AUpdate+on+Your+Ticket%3A+ID+%7B%7B+random_number+%7D%7D%0A%0ABody%3A%0AHello%2C%0A%0AYour+ticket+has+been+recently+updated+on+%7B%7B+date+%7D%7D.+We+kindly+request+you+to+review+and+acknowledge+the+changes+made.%0A%0AIf+you+have+any+further+updates+or+queries+regarding+your+ticket%2C+please+don%27t+hesitate+to+respond+to+this+email.%0A%0ABest+Regards%2C%0A%7B%7B+sender_name+%7D%7D'
   16     1        INIT_FCALL                                                   'explode'
          2        SEND_VAL                                                     'Body%3A'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
   18     6        FETCH_DIM_R                                          ~7      !1, 0
          7        FRAMELESS_ICALL_3                str_replace         ~8      'Subject%3A', ''
          8        OP_DATA                                                      ~7
          9        FRAMELESS_ICALL_1                trim                ~9      ~8
         10        ASSIGN                                                       !2, ~9
   19    11        FETCH_DIM_R                                          ~11     !1, 1
         12        FRAMELESS_ICALL_1                trim                ~12     ~11
         13        ASSIGN                                                       !3, ~12
   21    14        CONCAT                                               ~14     'Subject+%3D+%22', !2
         15        CONCAT                                               ~15     ~14, '%22'
         16        ECHO                                                         ~15
   22    17        ECHO                                                         '%0A%0A'
   23    18        CONCAT                                               ~16     'Body+%3D+%22', !3
         19        CONCAT                                               ~17     ~16, '%22'
         20        ECHO                                                         ~17
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.06 ms | 1819 KiB | 14 Q