3v4l.org

run code in 500+ PHP versions simultaneously
<?php $xml=<<<EOF <?xml version="1.0"?> <test/> EOF; $xsd=<<<EOF <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:include schemaLocation="nonexistent.xsd"/> <xs:element name="test"/> </xs:schema> EOF; libxml_set_external_entity_loader(function($p,$s,$c) { var_dump($p,$s,$c); die(); }); $dom=new DOMDocument($xml); var_dump($dom->schemaValidateSource($xsd));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5N24o
function name:  (null)
number of ops:  17
compiled vars:  !0 = $xml, !1 = $xsd, !2 = $dom
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Ctest%2F%3E'
    8     1        ASSIGN                                                       !1, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Cxs%3Aschema+xmlns%3Axs%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22%3E%0A++%3Cxs%3Ainclude+schemaLocation%3D%22nonexistent.xsd%22%2F%3E%0A++%3Cxs%3Aelement+name%3D%22test%22%2F%3E%0A%3C%2Fxs%3Aschema%3E'
   16     2        INIT_FCALL                                                   'libxml_set_external_entity_loader'
          3        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
   19     4        SEND_VAL                                                     ~5
   16     5        DO_ICALL                                                     
   21     6        NEW                                                  $7      'DOMDocument'
          7        SEND_VAR_EX                                                  !0
          8        DO_FCALL                                          0          
          9        ASSIGN                                                       !2, $7
   22    10        INIT_FCALL                                                   'var_dump'
         11        INIT_METHOD_CALL                                             !2, 'schemaValidateSource'
         12        SEND_VAR_EX                                                  !1
         13        DO_FCALL                                          0  $10     
         14        SEND_VAR                                                     $10
         15        DO_ICALL                                                     
         16      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 61) Position 1 = -2
filename:       /in/5N24o
function name:  {closure:/in/5N24o:16}
number of ops:  11
compiled vars:  !0 = $p, !1 = $s, !2 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
   17     3        INIT_FCALL                                                   'var_dump'
          4        SEND_VAR                                                     !0
          5        SEND_VAR                                                     !1
          6        SEND_VAR                                                     !2
          7        DO_ICALL                                                     
   18     8      > INIT_FCALL                                                   'exit'
          9*       DO_ICALL                                                     
   19    10*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
192.32 ms | 3375 KiB | 16 Q