3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=<<<XML <?xml version="1.0"?> <configuration> <startup><supportedRuntime version="v2.0.50727"/></startup> <appSettings> <!-- timeout in seconds --> <add key="AtgStartTimeout" value="20" /> <add key="EnableHermesLogging" value="true" /> <add key="HandleIOSDevices" value="true" /> <add key="UseAMCLoyalty" value="false" /> </appSettings> </configuration> XML; $xml=simplexml_load_string($str); $result=$xml->xpath('//scale[@gender="*" or @gender="m"][@age="*" or @age="39-59"]'); foreach($result as $node) { echo $node->attributes()->id."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/klpqj
function name:  (null)
number of ops:  19
compiled vars:  !0 = $str, !1 = $xml, !2 = $result, !3 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Cconfiguration%3E%0A++%3Cstartup%3E%3CsupportedRuntime+version%3D%22v2.0.50727%22%2F%3E%3C%2Fstartup%3E%0A++%3CappSettings%3E%0A++++%3C%21--+timeout+in+seconds+--%3E%0A++++%3Cadd+key%3D%22AtgStartTimeout%22+value%3D%2220%22+%2F%3E%0A++++%3Cadd+key%3D%22EnableHermesLogging%22+value%3D%22true%22+%2F%3E%0A++++%3Cadd+key%3D%22HandleIOSDevices%22+value%3D%22true%22+%2F%3E%0A++++%3Cadd+key%3D%22UseAMCLoyalty%22+value%3D%22false%22+%2F%3E%0A++%3C%2FappSettings%3E%0A%3C%2Fconfiguration%3E'
   15     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   16     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2F%2Fscale%5B%40gender%3D%22%2A%22+or+%40gender%3D%22m%22%5D%5B%40age%3D%22%2A%22+or+%40age%3D%2239-59%22%5D'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
   17     9      > FE_RESET_R                                       $9      !2, ->17
         10    > > FE_FETCH_R                                               $9, !3, ->17
   19    11    >   INIT_METHOD_CALL                                         !3, 'attributes'
         12        DO_FCALL                                      0  $10     
         13        FETCH_OBJ_R                                      ~11     $10, 'id'
         14        CONCAT                                           ~12     ~11, '%0A'
         15        ECHO                                                     ~12
   17    16      > JMP                                                      ->10
         17    >   FE_FREE                                                  $9
   20    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.01 ms | 1395 KiB | 15 Q