3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); function testXml(string $xml) { echo "this is a string: " .$xml; } $simpleXml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' . '<root>' . '<child>' . 'The Child' . '</child>' . '<emptyChild>' . '</emptyChild>' . '</root>'; $xml = new SimpleXmlElement($simpleXml); testXml($simpleXml);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lQdaZ
function name:  (null)
number of ops:  9
compiled vars:  !0 = $simpleXml, !1 = $xml
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                       !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+standalone%3D%22yes%22%3F%3E%3Croot%3E%3Cchild%3EThe+Child%3C%2Fchild%3E%3CemptyChild%3E%3C%2FemptyChild%3E%3C%2Froot%3E'
   17     1        NEW                                                  $3      'SimpleXmlElement'
          2        SEND_VAR_EX                                                  !0
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !1, $3
   19     5        INIT_FCALL                                                   'testxml'
          6        SEND_VAR                                                     !0
          7        DO_FCALL                                          0          
          8      > RETURN                                                       1

Function testxml:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lQdaZ
function name:  testXml
number of ops:  4
compiled vars:  !0 = $xml
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
    5     1        CONCAT                                               ~1      'this+is+a+string%3A+', !0
          2        ECHO                                                         ~1
    6     3      > RETURN                                                       null

End of function testxml

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
218.75 ms | 2199 KiB | 14 Q