3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locator = 'and position()=1]'; libxml_use_internal_errors(true); libxml_suppress_errors(true); $document = new \DOMDocument('1.0', 'UTF-8'); $xpath = new \DOMXPath($document); var_dump( $xpath->evaluate($locator, $document) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/njhn8
function name:  (null)
number of ops:  24
compiled vars:  !0 = $locator, !1 = $document, !2 = $xpath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'and+position%28%29%3D1%5D'
    4     1        INIT_FCALL                                               'libxml_use_internal_errors'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
    5     4        INIT_FCALL_BY_NAME                                       'libxml_suppress_errors'
          5        SEND_VAL_EX                                              <true>
          6        DO_FCALL                                      0          
    7     7        NEW                                              $6      'DOMDocument'
          8        SEND_VAL_EX                                              '1.0'
          9        SEND_VAL_EX                                              'UTF-8'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $6
    8    12        NEW                                              $9      'DOMXPath'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !2, $9
    9    16        INIT_FCALL                                               'var_dump'
         17        INIT_METHOD_CALL                                         !2, 'evaluate'
         18        SEND_VAR_EX                                              !0
         19        SEND_VAR_EX                                              !1
         20        DO_FCALL                                      0  $12     
         21        SEND_VAR                                                 $12
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.13 ms | 1399 KiB | 17 Q