3v4l.org

run code in 300+ PHP versions simultaneously
<?php $exit = "<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'><s:Body ><GetReadingsResponse xmlns='http://tempuri.org/'><GetReadingsResult xmlns:a='ht tp://schemas.datacontract.org/2004/07/SACObjects.Common.ObjectModel' xmlns:i='ht tp://www.w3.org/2001/XMLSchema-instance'><a:Lettura><a:CODUTE>456</a:CODUTE><a:D 1F1>12343</a:D1F1><a:D1F2>-1.7976931348623157E+308</a:D1F2><a:D1F3>-1.7976931348 623157E+308</a:D1F3><a:DMAX i:nil='true'/><a:DMIN i:nil='true'/><a:DNAH i:nil='t rue'/><a:DNAL i:nil='true'/><a:DTCL>2015-11-25T00:00:00</a:DTCL><a:DTE>2015-11-2 5T06:00:00</a:DTE><a:DTFH i:nil='true'/><a:DTFL i:nil='true'/><a:DVAR i:nil='tru e'/><a:FST>Ok</a:FST><a:IDL>0</a:IDL><a:LEG>OraLegale</a:LEG><a:NFA>0</a:NFA><a: SENT>N</a:SENT><a:TLE>Giornaliera</a:TLE><a:TYPL>Tot_Vb_g</a:TYPL></a:Lettura></ GetReadingsResult></GetReadingsResponse></s:Body></s:Envelope>"; str_replace ("<a:", '<', $exit); str_replace ("</a:", "</", $exit); $find1 = "Lettura>"; $find2 = "/Lettura>"; $pos = strpos($exit,$find1); echo $pos,"\n"; $sub= substr($exit,intval($find1),strlen($exit)-($find1-1)-($find2)); echo $sub; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MkL6N
function name:  (null)
number of ops:  33
compiled vars:  !0 = $exit, !1 = $find1, !2 = $find2, !3 = $pos, !4 = $sub
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cs%3AEnvelope+xmlns%3As%3D%27http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%27%3E%3Cs%3ABody%0A%3E%3CGetReadingsResponse+xmlns%3D%27http%3A%2F%2Ftempuri.org%2F%27%3E%3CGetReadingsResult+xmlns%3Aa%3D%27ht%0Atp%3A%2F%2Fschemas.datacontract.org%2F2004%2F07%2FSACObjects.Common.ObjectModel%27+xmlns%3Ai%3D%27ht%0Atp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%27%3E%3Ca%3ALettura%3E%3Ca%3ACODUTE%3E456%3C%2Fa%3ACODUTE%3E%3Ca%3AD%0A1F1%3E12343%3C%2Fa%3AD1F1%3E%3Ca%3AD1F2%3E-1.7976931348623157E%2B308%3C%2Fa%3AD1F2%3E%3Ca%3AD1F3%3E-1.7976931348%0A623157E%2B308%3C%2Fa%3AD1F3%3E%3Ca%3ADMAX+i%3Anil%3D%27true%27%2F%3E%3Ca%3ADMIN+i%3Anil%3D%27true%27%2F%3E%3Ca%3ADNAH+i%3Anil%3D%27t%0Arue%27%2F%3E%3Ca%3ADNAL+i%3Anil%3D%27true%27%2F%3E%3Ca%3ADTCL%3E2015-11-25T00%3A00%3A00%3C%2Fa%3ADTCL%3E%3Ca%3ADTE%3E2015-11-2%0A5T06%3A00%3A00%3C%2Fa%3ADTE%3E%3Ca%3ADTFH+i%3Anil%3D%27true%27%2F%3E%3Ca%3ADTFL+i%3Anil%3D%27true%27%2F%3E%3Ca%3ADVAR+i%3Anil%3D%27tru%0Ae%27%2F%3E%3Ca%3AFST%3EOk%3C%2Fa%3AFST%3E%3Ca%3AIDL%3E0%3C%2Fa%3AIDL%3E%3Ca%3ALEG%3EOraLegale%3C%2Fa%3ALEG%3E%3Ca%3ANFA%3E0%3C%2Fa%3ANFA%3E%3Ca%3A%0ASENT%3EN%3C%2Fa%3ASENT%3E%3Ca%3ATLE%3EGiornaliera%3C%2Fa%3ATLE%3E%3Ca%3ATYPL%3ETot_Vb_g%3C%2Fa%3ATYPL%3E%3C%2Fa%3ALettura%3E%3C%2F%0AGetReadingsResult%3E%3C%2FGetReadingsResponse%3E%3C%2Fs%3ABody%3E%3C%2Fs%3AEnvelope%3E'
   13     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%3Ca%3A'
          3        SEND_VAL                                                 '%3C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   14     6        INIT_FCALL                                               'str_replace'
          7        SEND_VAL                                                 '%3C%2Fa%3A'
          8        SEND_VAL                                                 '%3C%2F'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   15    11        ASSIGN                                                   !1, 'Lettura%3E'
   16    12        ASSIGN                                                   !2, '%2FLettura%3E'
   17    13        INIT_FCALL                                               'strpos'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !3, $10
   18    18        ECHO                                                     !3
         19        ECHO                                                     '%0A'
   19    20        INIT_FCALL                                               'substr'
         21        SEND_VAR                                                 !0
         22        CAST                                          4  ~12     !1
         23        SEND_VAL                                                 ~12
         24        STRLEN                                           ~13     !0
         25        SUB                                              ~14     !1, 1
         26        SUB                                              ~15     ~13, ~14
         27        SUB                                              ~16     ~15, !2
         28        SEND_VAL                                                 ~16
         29        DO_ICALL                                         $17     
         30        ASSIGN                                                   !4, $17
   20    31        ECHO                                                     !4
   21    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.44 ms | 1405 KiB | 19 Q