3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DomDocument; $doc->validateOnParse = true; $doc->loadXML ( '<?xml version="1.0" encoding="UTF-8"?> <root> <form id="testform1"> <input type="submit" /> </form> </root> ' ); // the getElementById is important! if ($doc->getElementById('testform1') === null) { throw new Exception('Failed'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gNRqa
function name:  (null)
number of ops:  18
compiled vars:  !0 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'DomDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        ASSIGN_OBJ                                               !0, 'validateOnParse'
          4        OP_DATA                                                  <true>
    6     5        INIT_METHOD_CALL                                         !0, 'loadXML'
    8     6        SEND_VAL_EX                                              '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A++++++++%3Croot%3E%0A++++++++++++%3Cform+id%3D%22testform1%22%3E%0A++++++++++++++++%3Cinput+type%3D%22submit%22+%2F%3E%0A++++++++++++%3C%2Fform%3E%0A++++++++%3C%2Froot%3E%0A++++++++'
          7        DO_FCALL                                      0          
   18     8        INIT_METHOD_CALL                                         !0, 'getElementById'
          9        SEND_VAL_EX                                              'testform1'
         10        DO_FCALL                                      0  $6      
         11        TYPE_CHECK                                    2          $6
         12      > JMPZ                                                     ~7, ->17
   20    13    >   NEW                                              $8      'Exception'
         14        SEND_VAL_EX                                              'Failed'
         15        DO_FCALL                                      0          
         16      > THROW                                         0          $8
   21    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.47 ms | 1393 KiB | 13 Q