3v4l.org

run code in 300+ PHP versions simultaneously
<?php $response = "<?xml version=1.0 encoding=utf-8?><LeadResponse xmlns=http://tempuri.org/><LeadId>0</LeadId><Error>Invalid Home Telephone.<br>Invalid Mobile Phone.<br></Error></LeadResponse>"; $xml = new SimpleXMLElement($response); $leadID = (string)$xml->LeadResponse->LeadId; var_dump($leadID);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HLcSH
function name:  (null)
number of ops:  13
compiled vars:  !0 = $response, !1 = $xml, !2 = $leadID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D1.0+encoding%3Dutf-8%3F%3E%3CLeadResponse+xmlns%3Dhttp%3A%2F%2Ftempuri.org%2F%3E%3CLeadId%3E0%3C%2FLeadId%3E%3CError%3EInvalid+Home+Telephone.%3Cbr%3EInvalid+Mobile+Phone.%3Cbr%3E%3C%2FError%3E%3C%2FLeadResponse%3E'
    6     1        NEW                                              $4      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
    7     5        FETCH_OBJ_R                                      ~7      !1, 'LeadResponse'
          6        FETCH_OBJ_R                                      ~8      ~7, 'LeadId'
          7        CAST                                          6  ~9      ~8
          8        ASSIGN                                                   !2, ~9
    9     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.13 ms | 1385 KiB | 15 Q