3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Dom\XMLDocument; $xml = XMLDocument::createFromString(<<<EOXML <?xml version="1.0" encoding="UTF-8"?> <note xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="note-nonamespace1.xsd http://localhost/note-nonamespace2.xsd" xsi:schemaLocation="http://www.happy-helpers1.com note-namespace1.xsd http://www.happy-helpers2.com http://localhost/note-namespace2.xsd"> </note> EOXML ); $documentElement = $xml->documentElement; $attributes = $documentElement->attributes; $schemaLocation = $attributes->getNamedItemNS('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation'); var_dump(explode(' ', $schemaLocation->textContent ?? ''));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jjbDc
function name:  (null)
number of ops:  24
compiled vars:  !0 = $xml, !1 = $documentElement, !2 = $attributes, !3 = $schemaLocation
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_STATIC_METHOD_CALL                                  'Dom%5CXMLDocument', 'createFromString'
    6     1        SEND_VAL_EX                                              '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Cnote%0A++++++xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%0A++++++xsi%3AnoNamespaceSchemaLocation%3D%22note-nonamespace1.xsd+http%3A%2F%2Flocalhost%2Fnote-nonamespace2.xsd%22%0A++++++xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.happy-helpers1.com+note-namespace1.xsd+http%3A%2F%2Fwww.happy-helpers2.com+http%3A%2F%2Flocalhost%2Fnote-namespace2.xsd%22%3E%0A%3C%2Fnote%3E'
    5     2        DO_FCALL                                      0  $4      
          3        ASSIGN                                                   !0, $4
   14     4        FETCH_OBJ_R                                      ~6      !0, 'documentElement'
          5        ASSIGN                                                   !1, ~6
   15     6        FETCH_OBJ_R                                      ~8      !1, 'attributes'
          7        ASSIGN                                                   !2, ~8
   16     8        INIT_METHOD_CALL                                         !2, 'getNamedItemNS'
          9        SEND_VAL_EX                                              'http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance'
         10        SEND_VAL_EX                                              'schemaLocation'
         11        DO_FCALL                                      0  $10     
         12        ASSIGN                                                   !3, $10
   17    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'explode'
         15        SEND_VAL                                                 '+'
         16        FETCH_OBJ_IS                                     ~12     !3, 'textContent'
         17        COALESCE                                         ~13     ~12
         18        QM_ASSIGN                                        ~13     ''
         19        SEND_VAL                                                 ~13
         20        DO_ICALL                                         $14     
         21        SEND_VAR                                                 $14
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.41 ms | 1001 KiB | 15 Q