3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('error_reporting',PHP_INT_MAX-1); $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/9endu
function name:  (null)
number of ops:  21
compiled vars:  !0 = $xml, !1 = $xsd, !2 = $dom
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'error_reporting'
          2        SEND_VAL                                                 9223372036854775806
          3        DO_ICALL                                                 
    3     4        ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Ctest%2F%3E'
    8     5        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     6        INIT_FCALL                                               'libxml_set_external_entity_loader'
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9endu%3A16%240'
   19     8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
   21    10        NEW                                              $8      'DOMDocument'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $8
   22    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !2, 'schemaValidateSource'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $11     
         18        SEND_VAR                                                 $11
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9endu%3A16%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/9endu
function name:  {closure}
number of ops:  10
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      > EXIT                                                     
   19     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9endu%3A16%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.27 ms | 1388 KiB | 19 Q