3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST['contentDetails'] = '<p>This is data sample.&nbsp;</p><p>Second part of the paragraph.&nbsp;</p>'; $xml = '<?xml version="1.0" encoding="UTF-8">'; $xml .= '<root>'; $xml .= '<myData>'; $xml .= '<content>' . htmlentities(str_replace("&nbsp;", "", $_POST['contentDetails'])) . '</content>'; $xml .= '</myData>'; $xml .= '</root>'; echo $xml;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oYsZ5
function name:  (null)
number of ops:  23
compiled vars:  !0 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $1      '_POST'
          1        ASSIGN_DIM                                               $1, 'contentDetails'
          2        OP_DATA                                                  '%3Cp%3EThis+is+data+sample.%26nbsp%3B%3C%2Fp%3E%3Cp%3ESecond+part+of+the+paragraph.%26nbsp%3B%3C%2Fp%3E'
    5     3        ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3E'
    6     4        ASSIGN_OP                                     8          !0, '%3Croot%3E'
    7     5        ASSIGN_OP                                     8          !0, '%3CmyData%3E'
    8     6        INIT_FCALL                                               'htmlentities'
          7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '%26nbsp%3B'
          9        SEND_VAL                                                 ''
         10        FETCH_R                      global              ~6      '_POST'
         11        FETCH_DIM_R                                      ~7      ~6, 'contentDetails'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                         $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                         $9      
         16        CONCAT                                           ~10     '%3Ccontent%3E', $9
         17        CONCAT                                           ~11     ~10, '%3C%2Fcontent%3E'
         18        ASSIGN_OP                                     8          !0, ~11
    9    19        ASSIGN_OP                                     8          !0, '%3C%2FmyData%3E'
   10    20        ASSIGN_OP                                     8          !0, '%3C%2Froot%3E'
   11    21        ECHO                                                     !0
   12    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.43 ms | 1000 KiB | 15 Q