3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create Security header $secns = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; $token = new stdClass; $token->Username = new SOAPVar('bugs_php_net_test', XSD_STRING, null, null, null, $secns); $token->Password = new SOAPVar('bugs_php_net_test', XSD_STRING, null, null, null, $secns); $wsec = new stdClass; $wsec->UsernameToken = new SoapVar($token, SOAP_ENC_OBJECT, null, null, null, $secns); $headers = new SOAPHeader($secns, 'Security', $wsec, true); // Go go go $client = new SoapClient("http://www.webservicex.net/periodictable.asmx?WSDL", array('exceptions' => true, 'trace' => 1)); $client->__setSOAPHeaders($headers); $client->GetAtomicNumber(array('ElementName' => 'Vanadium'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZjmWA
function name:  (null)
number of ops:  59
compiled vars:  !0 = $secns, !1 = $token, !2 = $wsec, !3 = $headers, !4 = $client
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fdocs.oasis-open.org%2Fwss%2F2004%2F01%2Foasis-200401-wss-wssecurity-secext-1.0.xsd'
    4     1        NEW                                              $6      'stdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
    5     4        NEW                                              $10     'SOAPVar'
          5        SEND_VAL_EX                                              'bugs_php_net_test'
          6        FETCH_CONSTANT                                   ~11     'XSD_STRING'
          7        SEND_VAL_EX                                              ~11
          8        SEND_VAL_EX                                              null
          9        SEND_VAL_EX                                              null
         10        SEND_VAL_EX                                              null
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
         13        ASSIGN_OBJ                                               !1, 'Username'
         14        OP_DATA                                                  $10
    6    15        NEW                                              $14     'SOAPVar'
         16        SEND_VAL_EX                                              'bugs_php_net_test'
         17        FETCH_CONSTANT                                   ~15     'XSD_STRING'
         18        SEND_VAL_EX                                              ~15
         19        SEND_VAL_EX                                              null
         20        SEND_VAL_EX                                              null
         21        SEND_VAL_EX                                              null
         22        SEND_VAR_EX                                              !0
         23        DO_FCALL                                      0          
         24        ASSIGN_OBJ                                               !1, 'Password'
         25        OP_DATA                                                  $14
    7    26        NEW                                              $17     'stdClass'
         27        DO_FCALL                                      0          
         28        ASSIGN                                                   !2, $17
    8    29        NEW                                              $21     'SoapVar'
         30        SEND_VAR_EX                                              !1
         31        FETCH_CONSTANT                                   ~22     'SOAP_ENC_OBJECT'
         32        SEND_VAL_EX                                              ~22
         33        SEND_VAL_EX                                              null
         34        SEND_VAL_EX                                              null
         35        SEND_VAL_EX                                              null
         36        SEND_VAR_EX                                              !0
         37        DO_FCALL                                      0          
         38        ASSIGN_OBJ                                               !2, 'UsernameToken'
         39        OP_DATA                                                  $21
    9    40        NEW                                              $24     'SOAPHeader'
         41        SEND_VAR_EX                                              !0
         42        SEND_VAL_EX                                              'Security'
         43        SEND_VAR_EX                                              !2
         44        SEND_VAL_EX                                              <true>
         45        DO_FCALL                                      0          
         46        ASSIGN                                                   !3, $24
   12    47        NEW                                              $27     'SoapClient'
         48        SEND_VAL_EX                                              'http%3A%2F%2Fwww.webservicex.net%2Fperiodictable.asmx%3FWSDL'
         49        SEND_VAL_EX                                              <array>
         50        DO_FCALL                                      0          
         51        ASSIGN                                                   !4, $27
   13    52        INIT_METHOD_CALL                                         !4, '__setSOAPHeaders'
         53        SEND_VAR_EX                                              !3
         54        DO_FCALL                                      0          
   14    55        INIT_METHOD_CALL                                         !4, 'GetAtomicNumber'
         56        SEND_VAL_EX                                              <array>
         57        DO_FCALL                                      0          
         58      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.74 ms | 1399 KiB | 13 Q