3v4l.org

run code in 300+ 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:  29
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        INIT_FCALL                                               'trim'
          7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 'Subject%3A'
          9        SEND_VAL                                                 ''
         10        FETCH_DIM_R                                      ~7      !1, 0
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                         $8      
         13        SEND_VAR                                                 $8
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !2, $9
   19    16        INIT_FCALL                                               'trim'
         17        FETCH_DIM_R                                      ~11     !1, 1
         18        SEND_VAL                                                 ~11
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !3, $12
   21    21        CONCAT                                           ~14     'Subject+%3D+%22', !2
         22        CONCAT                                           ~15     ~14, '%22'
         23        ECHO                                                     ~15
   22    24        ECHO                                                     '%0A%0A'
   23    25        CONCAT                                           ~16     'Body+%3D+%22', !3
         26        CONCAT                                           ~17     ~16, '%22'
         27        ECHO                                                     ~17
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.21 ms | 1005 KiB | 16 Q