3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <always> &lt;![CDATA[Document Checklist: Use this checklist to make sure all your documents are complete &amp; ready to go! There are a few things that we need that are often overlooked. * Please verify that your name spelling, middle initial and property address all match the information you submitted to the IRS exactly. * If you've filed taxes under different addresses for one or both of the last two years, please complete line 4 of the form. * Please provide a written signature, we cannot accept electronic signatures on this document. ]]&gt; </always> XML; $sml = new SimpleXMLElement ($xml); $result = $sml->xpath('/always'); $result2 = (string) array_pop($result); echo $result2; if (substr($result2, 0, 4) === '&lt;') $result2 = substr($result2, 4); if (substr($result2, -4) === '&gt;') $result2 = substr($result2, 0, -4); echo $result2;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 39
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 27
filename:       /in/Hikn7
function name:  (null)
number of ops:  41
compiled vars:  !0 = $xml, !1 = $sml, !2 = $result, !3 = $result2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%3Calways%3E%0A%26lt%3B%21%5BCDATA%5BDocument+Checklist%3A%0AUse+this+checklist+to+make+sure+all+your+documents+are%0Acomplete+%26amp%3B+ready+to+go%21+There+are+a+few+things+that+we+need%0Athat+are+often+overlooked.%0A%2A+Please+verify+that+your+name+spelling%2C+middle+initial+and%0Aproperty+address+all+match+the+information+you+submitted+to%0Athe+IRS+exactly.%0A%2A+If+you%27ve+filed+taxes+under+different+addresses+for+one+or%0Aboth+of+the+last+two+years%2C+please+complete+line+4+of+the%0Aform.%0A%2A+Please+provide+a+written+signature%2C+we+cannot+accept%0Aelectronic+signatures+on+this+document.%0A%0A%5D%5D%26gt%3B%0A%3C%2Falways%3E'
   23     1        NEW                                              $5      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
   25     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2Falways'
          7        DO_FCALL                                      0  $8      
          8        ASSIGN                                                   !2, $8
   26     9        INIT_FCALL                                               'array_pop'
         10        SEND_REF                                                 !2
         11        DO_ICALL                                         $10     
         12        CAST                                          6  ~11     $10
         13        ASSIGN                                                   !3, ~11
   28    14        ECHO                                                     !3
   32    15        INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !3
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 4
         19        DO_ICALL                                         $13     
         20        IS_IDENTICAL                                             $13, '%26lt%3B'
         21      > JMPZ                                                     ~14, ->27
         22    >   INIT_FCALL                                               'substr'
         23        SEND_VAR                                                 !3
         24        SEND_VAL                                                 4
         25        DO_ICALL                                         $15     
         26        ASSIGN                                                   !3, $15
   33    27    >   INIT_FCALL                                               'substr'
         28        SEND_VAR                                                 !3
         29        SEND_VAL                                                 -4
         30        DO_ICALL                                         $17     
         31        IS_IDENTICAL                                             $17, '%26gt%3B'
         32      > JMPZ                                                     ~18, ->39
         33    >   INIT_FCALL                                               'substr'
         34        SEND_VAR                                                 !3
         35        SEND_VAL                                                 0
         36        SEND_VAL                                                 -4
         37        DO_ICALL                                         $19     
         38        ASSIGN                                                   !3, $19
   35    39    >   ECHO                                                     !3
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.79 ms | 1400 KiB | 17 Q