3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<result total="26" start="0" count="10"/>'; $dom = new DOMDocument(); $dom->loadXml($xml); $xpath = new DOMXpath($dom); var_dump( $total = $xpath->evaluate('number(/*/@total)'), $start = $xpath->evaluate('number(/*/@start)'), $count = $xpath->evaluate('number(/*/@count)') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cmdun
function name:  (null)
number of ops:  29
compiled vars:  !0 = $xml, !1 = $dom, !2 = $xpath, !3 = $total, !4 = $start, !5 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cresult+total%3D%2226%22+start%3D%220%22+count%3D%2210%22%2F%3E'
    5     1        NEW                                              $7      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $7
    6     4        INIT_METHOD_CALL                                         !1, 'loadXml'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    7     7        NEW                                              $11     'DOMXpath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $11
    9    11        INIT_FCALL                                               'var_dump'
   10    12        INIT_METHOD_CALL                                         !2, 'evaluate'
         13        SEND_VAL_EX                                              'number%28%2F%2A%2F%40total%29'
         14        DO_FCALL                                      0  $14     
         15        ASSIGN                                           ~15     !3, $14
         16        SEND_VAL                                                 ~15
   11    17        INIT_METHOD_CALL                                         !2, 'evaluate'
         18        SEND_VAL_EX                                              'number%28%2F%2A%2F%40start%29'
         19        DO_FCALL                                      0  $16     
         20        ASSIGN                                           ~17     !4, $16
         21        SEND_VAL                                                 ~17
   12    22        INIT_METHOD_CALL                                         !2, 'evaluate'
         23        SEND_VAL_EX                                              'number%28%2F%2A%2F%40count%29'
         24        DO_FCALL                                      0  $18     
         25        ASSIGN                                           ~19     !5, $18
         26        SEND_VAL                                                 ~19
         27        DO_ICALL                                                 
   13    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.22 ms | 1395 KiB | 15 Q