3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=simplexml_load_string(<<<XML <root> <item> <price>88</price> <newprice>88</newprice> </item> <item> <price>88</price> <newprice>45</newprice> </item> <item> <price>88</price> <newprice>145</newprice> </item> </root> XML ); foreach($xml->xpath('//newprice[number(text())<number(../price/text())]') as $node) { print_r((string)$node); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/8ThqE
function name:  (null)
number of ops:  16
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                                                 '%3Croot%3E%0A%09%3Citem%3E%0A%09%09%3Cprice%3E88%3C%2Fprice%3E%0A%09%09%3Cnewprice%3E88%3C%2Fnewprice%3E%0A%09%3C%2Fitem%3E%0A%09%3Citem%3E%0A%09%09%3Cprice%3E88%3C%2Fprice%3E%0A%09%09%3Cnewprice%3E45%3C%2Fnewprice%3E%0A%09%3C%2Fitem%3E%0A%09%3Citem%3E%0A%09%09%3Cprice%3E88%3C%2Fprice%3E%0A%09%09%3Cnewprice%3E145%3C%2Fnewprice%3E%0A%09%3C%2Fitem%3E%0A%3C%2Froot%3E'
          2        DO_ICALL                                         $2      
    2     3        ASSIGN                                                   !0, $2
   19     4        INIT_METHOD_CALL                                         !0, 'xpath'
          5        SEND_VAL_EX                                              '%2F%2Fnewprice%5Bnumber%28text%28%29%29%3Cnumber%28..%2Fprice%2Ftext%28%29%29%5D'
          6        DO_FCALL                                      0  $4      
          7      > FE_RESET_R                                       $5      $4, ->14
          8    > > FE_FETCH_R                                               $5, !1, ->14
   21     9    >   INIT_FCALL                                               'print_r'
         10        CAST                                          6  ~6      !1
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                                 
   19    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $5
   22    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.9 ms | 1395 KiB | 17 Q