3v4l.org

run code in 300+ PHP versions simultaneously
<?php $buffer = <<<'BUFFER' <Mediainfo version="0.7.62"> <File> <track type="General"> <UniqueID_String>242652904449958064145306342749155800074 (0xB68D3FDDBE0F9B3E865F70325496B40A)</UniqueID_String> <CompleteName>D:\Encoder\videos\raw\063 - 077 (Season_02)\064 - A Pirate-Loving Town Arrival at Whiskey Peak.mkv</CompleteName> <Format>Matroska</Format> <Format_Version>Version 1</Format_Version> <FileSize_String>40.0 MiB</FileSize_String> <Duration_String>24mn 6s</Duration_String> <OverallBitRate_String>232 Kbps</OverallBitRate_String> <Encoded_Date>UTC 2008-08-26 15:24:58</Encoded_Date> <Encoded_Application>mkvmerge v2.2.0 (&apos;Turn It On Again&apos;) built on Mar 4 2008 12:58:26</Encoded_Application> <Encoded_Library_String>libebml v0.7.7 + libmatroska v0.8.1</Encoded_Library_String> </track> </File> </Mediainfo> BUFFER; $xml = simplexml_load_string($buffer); $iterations = 100000; $start = microtime(true); for($i = $iterations; $i--;) { $test = $xml->xpath('/*'); } printf("Result %.5f\n", $atime = microtime(true) - $start); $start = microtime(true); for($i = $iterations; $i--;) { $test = $xml->xpath('/Mediainfo'); } printf("Result %.5f\n", $btime = microtime(true) - $start);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 12
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 33
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 33
Branch analysis from position: 39
Branch analysis from position: 33
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 12
Branch analysis from position: 18
Branch analysis from position: 12
filename:       /in/0YLBP
function name:  (null)
number of ops:  49
compiled vars:  !0 = $buffer, !1 = $xml, !2 = $iterations, !3 = $start, !4 = $i, !5 = $test, !6 = $atime, !7 = $btime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3CMediainfo+version%3D%220.7.62%22%3E%0A++++%3CFile%3E%0A++++++++%3Ctrack+type%3D%22General%22%3E%0A++++++++++++%3CUniqueID_String%3E242652904449958064145306342749155800074+%280xB68D3FDDBE0F9B3E865F70325496B40A%29%3C%2FUniqueID_String%3E%0A++++++++++++%3CCompleteName%3ED%3A%5CEncoder%5Cvideos%5Craw%5C063+-+077+%28Season_02%29%5C064+-+A+Pirate-Loving+Town+Arrival+at+Whiskey+Peak.mkv%3C%2FCompleteName%3E%0A++++++++++++%3CFormat%3EMatroska%3C%2FFormat%3E%0A++++++++++++%3CFormat_Version%3EVersion+1%3C%2FFormat_Version%3E%0A++++++++++++%3CFileSize_String%3E40.0+MiB%3C%2FFileSize_String%3E%0A++++++++++++%3CDuration_String%3E24mn+6s%3C%2FDuration_String%3E%0A++++++++++++%3COverallBitRate_String%3E232+Kbps%3C%2FOverallBitRate_String%3E%0A++++++++++++%3CEncoded_Date%3EUTC+2008-08-26+15%3A24%3A58%3C%2FEncoded_Date%3E%0A++++++++++++%3CEncoded_Application%3Emkvmerge+v2.2.0+%28%26apos%3BTurn+It+On+Again%26apos%3B%29+built+on+Mar++4+2008+12%3A58%3A26%3C%2FEncoded_Application%3E%0A++++++++++++%3CEncoded_Library_String%3Elibebml+v0.7.7+%2B+libmatroska+v0.8.1%3C%2FEncoded_Library_String%3E%0A++++++++%3C%2Ftrack%3E%0A++++%3C%2FFile%3E%0A%3C%2FMediainfo%3E'
   21     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $9      
          4        ASSIGN                                                   !1, $9
   23     5        ASSIGN                                                   !2, 100000
   25     6        INIT_FCALL                                               'microtime'
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $12     
          9        ASSIGN                                                   !3, $12
   26    10        ASSIGN                                                   !4, !2
         11      > JMP                                                      ->16
   28    12    >   INIT_METHOD_CALL                                         !1, 'xpath'
         13        SEND_VAL_EX                                              '%2F%2A'
         14        DO_FCALL                                      0  $15     
         15        ASSIGN                                                   !5, $15
   26    16    >   POST_DEC                                         ~17     !4
         17      > JMPNZ                                                    ~17, ->12
   30    18    >   INIT_FCALL                                               'printf'
         19        SEND_VAL                                                 'Result+%25.5f%0A'
         20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $18     
         23        SUB                                              ~19     $18, !3
         24        ASSIGN                                           ~20     !6, ~19
         25        SEND_VAL                                                 ~20
         26        DO_ICALL                                                 
   32    27        INIT_FCALL                                               'microtime'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $22     
         30        ASSIGN                                                   !3, $22
   33    31        ASSIGN                                                   !4, !2
         32      > JMP                                                      ->37
   35    33    >   INIT_METHOD_CALL                                         !1, 'xpath'
         34        SEND_VAL_EX                                              '%2FMediainfo'
         35        DO_FCALL                                      0  $25     
         36        ASSIGN                                                   !5, $25
   33    37    >   POST_DEC                                         ~27     !4
         38      > JMPNZ                                                    ~27, ->33
   37    39    >   INIT_FCALL                                               'printf'
         40        SEND_VAL                                                 'Result+%25.5f%0A'
         41        INIT_FCALL                                               'microtime'
         42        SEND_VAL                                                 <true>
         43        DO_ICALL                                         $28     
         44        SUB                                              ~29     $28, !3
         45        ASSIGN                                           ~30     !7, ~29
         46        SEND_VAL                                                 ~30
         47        DO_ICALL                                                 
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.19 ms | 1400 KiB | 19 Q