3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locator = 'and position()=1]'; $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/2QpST
function name:  (null)
number of ops:  20
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        NEW                                              $4      'DOMDocument'
          2        SEND_VAL_EX                                              '1.0'
          3        SEND_VAL_EX                                              'UTF-8'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
    5     6        NEW                                              $7      'DOMXPath'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $7
    6    10        INIT_FCALL                                               'var_dump'
         11        BEGIN_SILENCE                                    ~10     
         12        INIT_METHOD_CALL                                         !2, 'evaluate'
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $11     
         16        END_SILENCE                                              ~10
         17        SEND_VAR                                                 $11
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.95 ms | 1395 KiB | 15 Q