3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<'HTML' <body>bar bar HTML; echo "Strict Error Checking: FALSE\n"; echo str_repeat("-", 50),"\n"; try { $document = new DOMDocument(); $document->strictErrorChecking = FALSE; $document->loadXML($html); } catch (Throwable $e) { echo "Catched: ", get_class($e), "\n"; } echo str_repeat("-", 50),"\n"; echo "Strict Error Checking: TRUE\n"; echo str_repeat("-", 50),"\n"; try { $document = new DOMDocument(); $document->strictErrorChecking = TRUE; $document->loadXML($html); } catch (Throwable $e) { echo "Catched: ", get_class($e), "\n"; } echo str_repeat("-", 50),"\n"; libxml_use_internal_errors(TRUE); echo "Strict Error Checking: FALSE\n"; echo str_repeat("-", 50),"\n"; try { $document = new DOMDocument(); $document->strictErrorChecking = FALSE; $document->loadHTML($html); } catch (Throwable $e) { echo "Catched: ", get_class($e), "\n"; } echo str_repeat("-", 50),"\n"; echo "Strict Error Checking: TRUE\n"; echo str_repeat("-", 50),"\n"; try { $document = new DOMDocument(); $document->strictErrorChecking = TRUE; $document->loadHTML($html); } catch (Throwable $e) { echo "Catched: ", get_class($e), "\n"; } echo str_repeat("-", 50),"\n"; $document = new DOMDocument(); $document->appendChild($document->createElement('foo')); $document->appendChild($document->createElement('foo')); echo $document->saveXML(); $document = new DOMDocument(); $document->strictErrorChecking = TRUE; $document->appendChild($document->createElement('foo')); $document->appendChild($document->createElement('foo')); echo $document->saveXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
1 jumps found. (Code = 42) Position 1 = 106
Branch analysis from position: 106
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 17
Branch analysis from position: 17
2 jumps found. (Code = 107) Position 1 = 18, Position 2 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
Found catch point at position: 44
Branch analysis from position: 44
2 jumps found. (Code = 107) Position 1 = 45, Position 2 = -2
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
Found catch point at position: 74
Branch analysis from position: 74
2 jumps found. (Code = 107) Position 1 = 75, Position 2 = -2
Branch analysis from position: 75
1 jumps found. (Code = 42) Position 1 = 106
Branch analysis from position: 106
Found catch point at position: 101
Branch analysis from position: 101
2 jumps found. (Code = 107) Position 1 = 102, Position 2 = -2
Branch analysis from position: 102
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ssj4L
function name:  (null)
number of ops:  151
compiled vars:  !0 = $html, !1 = $document, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cbody%3Ebar+bar'
    7     1        ECHO                                                     'Strict+Error+Checking%3A+FALSE%0A'
    8     2        INIT_FCALL                                               'str_repeat'
          3        SEND_VAL                                                 '-'
          4        SEND_VAL                                                 50
          5        DO_ICALL                                         $4      
          6        ECHO                                                     $4
          7        ECHO                                                     '%0A'
   10     8        NEW                                              $5      'DOMDocument'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $5
   11    11        ASSIGN_OBJ                                               !1, 'strictErrorChecking'
         12        OP_DATA                                                  <false>
   12    13        INIT_METHOD_CALL                                         !1, 'loadXML'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0          
         16      > JMP                                                      ->22
   13    17  E > > CATCH                                       last         'Throwable'
   14    18    >   ECHO                                                     'Catched%3A+'
         19        GET_CLASS                                        ~10     !2
         20        ECHO                                                     ~10
         21        ECHO                                                     '%0A'
   16    22    >   INIT_FCALL                                               'str_repeat'
         23        SEND_VAL                                                 '-'
         24        SEND_VAL                                                 50
         25        DO_ICALL                                         $11     
         26        ECHO                                                     $11
         27        ECHO                                                     '%0A'
   19    28        ECHO                                                     'Strict+Error+Checking%3A+TRUE%0A'
   20    29        INIT_FCALL                                               'str_repeat'
         30        SEND_VAL                                                 '-'
         31        SEND_VAL                                                 50
         32        DO_ICALL                                         $12     
         33        ECHO                                                     $12
         34        ECHO                                                     '%0A'
   22    35        NEW                                              $13     'DOMDocument'
         36        DO_FCALL                                      0          
         37        ASSIGN                                                   !1, $13
   23    38        ASSIGN_OBJ                                               !1, 'strictErrorChecking'
         39        OP_DATA                                                  <true>
   24    40        INIT_METHOD_CALL                                         !1, 'loadXML'
         41        SEND_VAR_EX                                              !0
         42        DO_FCALL                                      0          
         43      > JMP                                                      ->49
   25    44  E > > CATCH                                       last         'Throwable'
   26    45    >   ECHO                                                     'Catched%3A+'
         46        GET_CLASS                                        ~18     !2
         47        ECHO                                                     ~18
         48        ECHO                                                     '%0A'
   28    49    >   INIT_FCALL                                               'str_repeat'
         50        SEND_VAL                                                 '-'
         51        SEND_VAL                                                 50
         52        DO_ICALL                                         $19     
         53        ECHO                                                     $19
         54        ECHO                                                     '%0A'
   30    55        INIT_FCALL                                               'libxml_use_internal_errors'
         56        SEND_VAL                                                 <true>
         57        DO_ICALL                                                 
   32    58        ECHO                                                     'Strict+Error+Checking%3A+FALSE%0A'
   33    59        INIT_FCALL                                               'str_repeat'
         60        SEND_VAL                                                 '-'
         61        SEND_VAL                                                 50
         62        DO_ICALL                                         $21     
         63        ECHO                                                     $21
         64        ECHO                                                     '%0A'
   35    65        NEW                                              $22     'DOMDocument'
         66        DO_FCALL                                      0          
         67        ASSIGN                                                   !1, $22
   36    68        ASSIGN_OBJ                                               !1, 'strictErrorChecking'
         69        OP_DATA                                                  <false>
   37    70        INIT_METHOD_CALL                                         !1, 'loadHTML'
         71        SEND_VAR_EX                                              !0
         72        DO_FCALL                                      0          
         73      > JMP                                                      ->79
   38    74  E > > CATCH                                       last         'Throwable'
   39    75    >   ECHO                                                     'Catched%3A+'
         76        GET_CLASS                                        ~27     !2
         77        ECHO                                                     ~27
         78        ECHO                                                     '%0A'
   41    79    >   INIT_FCALL                                               'str_repeat'
         80        SEND_VAL                                                 '-'
         81        SEND_VAL                                                 50
         82        DO_ICALL                                         $28     
         83        ECHO                                                     $28
         84        ECHO                                                     '%0A'
   44    85        ECHO                                                     'Strict+Error+Checking%3A+TRUE%0A'
   45    86        INIT_FCALL                                               'str_repeat'
         87        SEND_VAL                                                 '-'
         88        SEND_VAL                                                 50
         89        DO_ICALL                                         $29     
         90        ECHO                                                     $29
         91        ECHO                                                     '%0A'
   47    92        NEW                                              $30     'DOMDocument'
         93        DO_FCALL                                      0          
         94        ASSIGN                                                   !1, $30
   48    95        ASSIGN_OBJ                                               !1, 'strictErrorChecking'
         96        OP_DATA                                                  <true>
   49    97        INIT_METHOD_CALL                                         !1, 'loadHTML'
         98        SEND_VAR_EX                                              !0
         99        DO_FCALL                                      0          
        100      > JMP                                                      ->106
   50   101  E > > CATCH                                       last         'Throwable'
   51   102    >   ECHO                                                     'Catched%3A+'
        103        GET_CLASS                                        ~35     !2
        104        ECHO                                                     ~35
        105        ECHO                                                     '%0A'
   53   106    >   INIT_FCALL                                               'str_repeat'
        107        SEND_VAL                                                 '-'
        108        SEND_VAL                                                 50
        109        DO_ICALL                                         $36     
        110        ECHO                                                     $36
        111        ECHO                                                     '%0A'
   56   112        NEW                                              $37     'DOMDocument'
        113        DO_FCALL                                      0          
        114        ASSIGN                                                   !1, $37
   57   115        INIT_METHOD_CALL                                         !1, 'appendChild'
        116        INIT_METHOD_CALL                                         !1, 'createElement'
        117        SEND_VAL_EX                                              'foo'
        118        DO_FCALL                                      0  $40     
        119        SEND_VAR_NO_REF_EX                                       $40
        120        DO_FCALL                                      0          
   58   121        INIT_METHOD_CALL                                         !1, 'appendChild'
        122        INIT_METHOD_CALL                                         !1, 'createElement'
        123        SEND_VAL_EX                                              'foo'
        124        DO_FCALL                                      0  $42     
        125        SEND_VAR_NO_REF_EX                                       $42
        126        DO_FCALL                                      0          
   59   127        INIT_METHOD_CALL                                         !1, 'saveXML'
        128        DO_FCALL                                      0  $44     
        129        ECHO                                                     $44
   61   130        NEW                                              $45     'DOMDocument'
        131        DO_FCALL                                      0          
        132        ASSIGN                                                   !1, $45
   62   133        ASSIGN_OBJ                                               !1, 'strictErrorChecking'
        134        OP_DATA                                                  <true>
   63   135        INIT_METHOD_CALL                                         !1, 'appendChild'
        136        INIT_METHOD_CALL                                         !1, 'createElement'
        137        SEND_VAL_EX                                              'foo'
        138        DO_FCALL                                      0  $49     
        139        SEND_VAR_NO_REF_EX                                       $49
        140        DO_FCALL                                      0          
   64   141        INIT_METHOD_CALL                                         !1, 'appendChild'
        142        INIT_METHOD_CALL                                         !1, 'createElement'
        143        SEND_VAL_EX                                              'foo'
        144        DO_FCALL                                      0  $51     
        145        SEND_VAR_NO_REF_EX                                       $51
        146        DO_FCALL                                      0          
   65   147        INIT_METHOD_CALL                                         !1, 'saveXML'
        148        DO_FCALL                                      0  $53     
        149        ECHO                                                     $53
        150      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
126.35 ms | 1413 KiB | 17 Q