3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = '<?xml version="1.0" encoding="UTF-8"?> <root a="b"> <row b="y"> <item s="t" /> </row> <row p="c"> <item y="n" /> </row> </root>'; $simple_xml = @simplexml_load_string($a); echo "The XML without new lines,tabs\n:"; $b = str_replace( array("\n", "\r", "\t"), "", $a ); echo "The Bug\n:"; $simple_xml = @simplexml_load_string($b); var_dump($simple_xml); echo json_encode($simple_xml);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RUnot
function name:  (null)
number of ops:  29
compiled vars:  !0 = $a, !1 = $simple_xml, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Croot+a%3D%22b%22%3E%0A%09%3Crow+b%3D%22y%22%3E%0A%09%09%3Citem+s%3D%22t%22+%2F%3E%0A%09%3C%2Frow%3E%0A%09%3Crow+p%3D%22c%22%3E%0A%09%09%3Citem+y%3D%22n%22+%2F%3E%0A%09%3C%2Frow%3E%0A%3C%2Froot%3E'
   13     1        BEGIN_SILENCE                                    ~4      
          2        INIT_FCALL                                               'simplexml_load_string'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        END_SILENCE                                              ~4
          6        ASSIGN                                                   !1, $5
   15     7        ECHO                                                     'The+XML+without+new+lines%2Ctabs%0A%3A'
   16     8        INIT_FCALL                                               'str_replace'
          9        SEND_VAL                                                 <array>
         10        SEND_VAL                                                 ''
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !2, $7
   18    14        ECHO                                                     'The+Bug%0A%3A'
   19    15        BEGIN_SILENCE                                    ~9      
         16        INIT_FCALL                                               'simplexml_load_string'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $10     
         19        END_SILENCE                                              ~9
         20        ASSIGN                                                   !1, $10
   20    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
   22    24        INIT_FCALL                                               'json_encode'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $13     
         27        ECHO                                                     $13
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.04 ms | 1396 KiB | 21 Q