3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=simplexml_load_string(<<<XML <?xml version="1.0" encoding="UTF-8"?> <paymentService version="1.0" > <ns0:submit xmlns:ns0="http://www.tibco.com/ns/no_namespace_schema_location/Payment/PaymentProcessors/WorldPay_CC/SharedResources/Schemas/paymentService_v1.dtd"> <ns0:order> <description>description</description> <amount value="500" currencyCode="EUR" exponent="2"/> <ns0:paymentDetails> <ns0:VISA-SSL> <cardNumber>00009875083428501</cardNumber> <expiryDate> <date month="02" year="2008"/> </expiryDate> <cardHolderName>test</cardHolderName> </ns0:VISA-SSL> <session shopperIPAddress="192.165.22.35" id=""/> </ns0:paymentDetails> <shopper> <browser> <acceptHeader>text/html</acceptHeader> <userAgentHeader>mozilla 5.0</userAgentHeader> </browser> </shopper> </ns0:order> </ns0:submit> </paymentService> XML ); $xml->registerXPathNamespace('ns0', 'http://www.tibco.com/ns/no_namespace_schema_location/Payment/PaymentProcessors/WorldPay_CC/SharedResources/Schemas/paymentService_v1.dtd'); foreach($xml->xpath('/paymentService/ns0:submit/ns0:order/ns0:paymentDetails/ns0:VISA-SSL/cardNumber') as $node) { echo (string)$node; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/SsZRM
function name:  (null)
number of ops:  18
compiled vars:  !0 = $xml, !1 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'simplexml_load_string'
    3     1        SEND_VAL                                                 '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CpaymentService+version%3D%221.0%22+%3E%0A++++%3Cns0%3Asubmit+xmlns%3Ans0%3D%22http%3A%2F%2Fwww.tibco.com%2Fns%2Fno_namespace_schema_location%2FPayment%2FPaymentProcessors%2FWorldPay_CC%2FSharedResources%2FSchemas%2FpaymentService_v1.dtd%22%3E%0A++++++++%3Cns0%3Aorder%3E%0A++++++++++++%3Cdescription%3Edescription%3C%2Fdescription%3E%0A++++++++++++%3Camount+value%3D%22500%22+currencyCode%3D%22EUR%22+exponent%3D%222%22%2F%3E%0A++++++++++++%3Cns0%3ApaymentDetails%3E%0A++++++++++++++++%3Cns0%3AVISA-SSL%3E%0A++++++++++++++++++++%3CcardNumber%3E00009875083428501%3C%2FcardNumber%3E%0A++++++++++++++++++++%3CexpiryDate%3E%0A++++++++++++++++++++++++%3Cdate+month%3D%2202%22+year%3D%222008%22%2F%3E%0A++++++++++++++++++++%3C%2FexpiryDate%3E%0A++++++++++++++++++++%3CcardHolderName%3Etest%3C%2FcardHolderName%3E%0A++++++++++++++++%3C%2Fns0%3AVISA-SSL%3E%0A++++++++++++++++%3Csession+shopperIPAddress%3D%22192.165.22.35%22+id%3D%22%22%2F%3E%0A++++++++++++%3C%2Fns0%3ApaymentDetails%3E%0A++++++++++++%3Cshopper%3E%0A++++++++++++++++%3Cbrowser%3E%0A++++++++++++++++++++%3CacceptHeader%3Etext%2Fhtml%3C%2FacceptHeader%3E%0A++++++++++++++++++++%3CuserAgentHeader%3Emozilla+5.0%3C%2FuserAgentHeader%3E%0A++++++++++++++++%3C%2Fbrowser%3E%0A++++++++++++%3C%2Fshopper%3E%0A++++++++%3C%2Fns0%3Aorder%3E%0A++++%3C%2Fns0%3Asubmit%3E%0A%3C%2FpaymentService%3E'
          2        DO_ICALL                                         $2      
    2     3        ASSIGN                                                   !0, $2
   30     4        INIT_METHOD_CALL                                         !0, 'registerXPathNamespace'
          5        SEND_VAL_EX                                              'ns0'
          6        SEND_VAL_EX                                              'http%3A%2F%2Fwww.tibco.com%2Fns%2Fno_namespace_schema_location%2FPayment%2FPaymentProcessors%2FWorldPay_CC%2FSharedResources%2FSchemas%2FpaymentService_v1.dtd'
          7        DO_FCALL                                      0          
   31     8        INIT_METHOD_CALL                                         !0, 'xpath'
          9        SEND_VAL_EX                                              '%2FpaymentService%2Fns0%3Asubmit%2Fns0%3Aorder%2Fns0%3ApaymentDetails%2Fns0%3AVISA-SSL%2FcardNumber'
         10        DO_FCALL                                      0  $5      
         11      > FE_RESET_R                                       $6      $5, ->16
         12    > > FE_FETCH_R                                               $6, !1, ->16
   33    13    >   CAST                                          6  ~7      !1
         14        ECHO                                                     ~7
   31    15      > JMP                                                      ->12
         16    >   FE_FREE                                                  $6
   34    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.32 ms | 1396 KiB | 15 Q