3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); @ini_set('display_errors', 'On'); @ini_set('display_startup_errors', 'On'); $noCDATA = <<<XML <?xml version='1.0'?> <message> It fails with special characters, like "CoÒ &#x19; &#x1A;¶peratiehof 16a". </message> XML; $yesCDATA = <<<XML <?xml version='1.0'?> <message><![CDATA[ It fails with special characters, like "CoÒ &#x19; &#x1A;¶peratiehof 16a". Hence we need to wrap it. ]]></message> XML; $xml = simplexml_load_string($yesCDATA); print_r((string) $xml); #$xml = simplexml_load_string($noCDATA); #print_r((string) $xml);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WT0rX
function name:  (null)
number of ops:  26
compiled vars:  !0 = $noCDATA, !1 = $yesCDATA, !2 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    3     3        BEGIN_SILENCE                                    ~4      
          4        INIT_FCALL                                               'ini_set'
          5        SEND_VAL                                                 'display_errors'
          6        SEND_VAL                                                 'On'
          7        DO_ICALL                                                 
          8        END_SILENCE                                              ~4
    4     9        BEGIN_SILENCE                                    ~6      
         10        INIT_FCALL                                               'ini_set'
         11        SEND_VAL                                                 'display_startup_errors'
         12        SEND_VAL                                                 'On'
         13        DO_ICALL                                                 
         14        END_SILENCE                                              ~6
    6    15        ASSIGN                                                   !0, '%3C%3Fxml+version%3D%271.0%27%3F%3E+%0A%3Cmessage%3E%0A%09It+fails+with+special+characters%2C+like+%22Co%C3%92+%26%23x19%3B+%26%23x1A%3B%C2%B6peratiehof+16a%22.%0A%3C%2Fmessage%3E'
   13    16        ASSIGN                                                   !1, '%3C%3Fxml+version%3D%271.0%27%3F%3E+%0A%3Cmessage%3E%3C%21%5BCDATA%5B%0A%09It+fails+with+special+characters%2C+like+%22Co%C3%92+%26%23x19%3B+%26%23x1A%3B%C2%B6peratiehof+16a%22.+Hence+we+need+to+wrap+it.%0A%5D%5D%3E%3C%2Fmessage%3E'
   20    17        INIT_FCALL                                               'simplexml_load_string'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $10     
         20        ASSIGN                                                   !2, $10
   21    21        INIT_FCALL                                               'print_r'
         22        CAST                                          6  ~12     !2
         23        SEND_VAL                                                 ~12
         24        DO_ICALL                                                 
   24    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.98 ms | 1395 KiB | 21 Q