3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new DOMDocument(); $element = $xml->createElement('saml:Assertion'); $xml_saml_assertion = $xml->appendChild($element); $attribute = $xml->createAttribute('id'); $attribute->value = 'IDCard'; $xml_saml_assertion->appendChild($attribute); $attribute = $xml->createAttribute('xmlns:saml'); $attribute->value = 'urn:oasis:names:tc:SAML:2.0:assertion'; $xml_saml_assertion->appendChild($attribute); $attribute = $xml->createAttribute('Version'); $attribute->value = '2.0'; $xml_saml_assertion->appendChild($attribute); var_dump($element->attributes[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NNUsV
function name:  (null)
number of ops:  44
compiled vars:  !0 = $xml, !1 = $element, !2 = $xml_saml_assertion, !3 = $attribute
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    5     3        INIT_METHOD_CALL                                         !0, 'createElement'
          4        SEND_VAL_EX                                              'saml%3AAssertion'
          5        DO_FCALL                                      0  $7      
          6        ASSIGN                                                   !1, $7
    6     7        INIT_METHOD_CALL                                         !0, 'appendChild'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
    8    11        INIT_METHOD_CALL                                         !0, 'createAttribute'
         12        SEND_VAL_EX                                              'id'
         13        DO_FCALL                                      0  $11     
         14        ASSIGN                                                   !3, $11
    9    15        ASSIGN_OBJ                                               !3, 'value'
         16        OP_DATA                                                  'IDCard'
   10    17        INIT_METHOD_CALL                                         !2, 'appendChild'
         18        SEND_VAR_EX                                              !3
         19        DO_FCALL                                      0          
   12    20        INIT_METHOD_CALL                                         !0, 'createAttribute'
         21        SEND_VAL_EX                                              'xmlns%3Asaml'
         22        DO_FCALL                                      0  $15     
         23        ASSIGN                                                   !3, $15
   13    24        ASSIGN_OBJ                                               !3, 'value'
         25        OP_DATA                                                  'urn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Aassertion'
   14    26        INIT_METHOD_CALL                                         !2, 'appendChild'
         27        SEND_VAR_EX                                              !3
         28        DO_FCALL                                      0          
   16    29        INIT_METHOD_CALL                                         !0, 'createAttribute'
         30        SEND_VAL_EX                                              'Version'
         31        DO_FCALL                                      0  $19     
         32        ASSIGN                                                   !3, $19
   17    33        ASSIGN_OBJ                                               !3, 'value'
         34        OP_DATA                                                  '2.0'
   18    35        INIT_METHOD_CALL                                         !2, 'appendChild'
         36        SEND_VAR_EX                                              !3
         37        DO_FCALL                                      0          
   20    38        INIT_FCALL                                               'var_dump'
         39        FETCH_OBJ_R                                      ~23     !1, 'attributes'
         40        FETCH_DIM_R                                      ~24     ~23, 1
         41        SEND_VAL                                                 ~24
         42        DO_ICALL                                                 
         43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.41 ms | 1003 KiB | 14 Q