3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fixtureDocumentA = " <root> <nodeOne>value1</nodeOne> <nodeTwo>value2</nodeTwo> <nodeThree>value3</nodeThree> <section> <partOne>value1</partOne> <partTwo>value2</partTwo> <partThree>value3</partThree> </section> <anotherSection> <duplicateNode>unique_value0</duplicateNode> <duplicateNode>unique_value1</duplicateNode> </anotherSection> </root> "; $baseDocument = simplexml_load_string($fixtureDocumentA); print_r($baseDocument); $stuff = $baseDocument->xpath('/root/anotherSection/duplicateNode/text()'); $thing = current($stuff); print_r($stuff); print_r($thing); var_dump($thing); var_dump(empty($thing)); var_dump($thing->count()); var_dump(strval($thing));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2jROG
function name:  (null)
number of ops:  39
compiled vars:  !0 = $fixtureDocumentA, !1 = $baseDocument, !2 = $stuff, !3 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%0A++++++++%3Croot%3E%0A++++++++++++%3CnodeOne%3Evalue1%3C%2FnodeOne%3E%0A++++++++++++%3CnodeTwo%3Evalue2%3C%2FnodeTwo%3E%0A++++++++++++%3CnodeThree%3Evalue3%3C%2FnodeThree%3E%0A++++++++++++%3Csection%3E%0A++++++++++++++++%3CpartOne%3Evalue1%3C%2FpartOne%3E%0A++++++++++++++++%3CpartTwo%3Evalue2%3C%2FpartTwo%3E%0A++++++++++++++++%3CpartThree%3Evalue3%3C%2FpartThree%3E%0A++++++++++++%3C%2Fsection%3E%0A++++++++++++%3CanotherSection%3E%0A++++++++++++++++%3CduplicateNode%3Eunique_value0%3C%2FduplicateNode%3E%0A++++++++++++++++%3CduplicateNode%3Eunique_value1%3C%2FduplicateNode%3E%0A++++++++++++%3C%2FanotherSection%3E%0A++++++++%3C%2Froot%3E%0A++++++++'
   19     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   21     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   22     8        INIT_METHOD_CALL                                         !1, 'xpath'
          9        SEND_VAL_EX                                              '%2Froot%2FanotherSection%2FduplicateNode%2Ftext%28%29'
         10        DO_FCALL                                      0  $8      
         11        ASSIGN                                                   !2, $8
   23    12        INIT_FCALL                                               'current'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !3, $10
   24    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
   25    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
   26    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                                 
   27    25        INIT_FCALL                                               'var_dump'
         26        ISSET_ISEMPTY_CV                                 ~15     !3
         27        SEND_VAL                                                 ~15
         28        DO_ICALL                                                 
   28    29        INIT_FCALL                                               'var_dump'
         30        INIT_METHOD_CALL                                         !3, 'count'
         31        DO_FCALL                                      0  $17     
         32        SEND_VAR                                                 $17
         33        DO_ICALL                                                 
   29    34        INIT_FCALL                                               'var_dump'
         35        CAST                                          6  ~19     !3
         36        SEND_VAL                                                 ~19
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.9 ms | 1400 KiB | 21 Q