3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = microtime(1); for ($i = 0; $i<100000; $i++){ count($xml->xpath('*')); } var_dump(microtime(1)-$t); $t = microtime(1); for ($i = 0; $i<100000; $i++){ $xml->count(); isset($xml->children()->tag); $xml->children()->tag; } var_dump(microtime(1)-$t);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 6
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 27
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 27
Branch analysis from position: 40
Branch analysis from position: 27
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 6
Branch analysis from position: 14
Branch analysis from position: 6
filename:       /in/W6iJY
function name:  (null)
number of ops:  48
compiled vars:  !0 = $t, !1 = $i, !2 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 1
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    3     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->12
    4     6    >   INIT_METHOD_CALL                                         !2, 'xpath'
          7        SEND_VAL_EX                                              '%2A'
          8        DO_FCALL                                      0  $6      
          9        COUNT                                            ~7      $6
         10        FREE                                                     ~7
    3    11        PRE_INC                                                  !1
         12    >   IS_SMALLER                                               !1, 100000
         13      > JMPNZ                                                    ~9, ->6
    6    14    >   INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 1
         17        DO_ICALL                                         $10     
         18        SUB                                              ~11     $10, !0
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                                 
    8    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 1
         23        DO_ICALL                                         $13     
         24        ASSIGN                                                   !0, $13
    9    25        ASSIGN                                                   !1, 0
         26      > JMP                                                      ->38
   10    27    >   INIT_METHOD_CALL                                         !2, 'count'
         28        DO_FCALL                                      0          
   11    29        INIT_METHOD_CALL                                         !2, 'children'
         30        DO_FCALL                                      0  $17     
         31        ISSET_ISEMPTY_PROP_OBJ                           ~18     $17, 'tag'
         32        FREE                                                     ~18
   12    33        INIT_METHOD_CALL                                         !2, 'children'
         34        DO_FCALL                                      0  $19     
         35        FETCH_OBJ_R                                      ~20     $19, 'tag'
         36        FREE                                                     ~20
    9    37        PRE_INC                                                  !1
         38    >   IS_SMALLER                                               !1, 100000
         39      > JMPNZ                                                    ~22, ->27
   14    40    >   INIT_FCALL                                               'var_dump'
         41        INIT_FCALL                                               'microtime'
         42        SEND_VAL                                                 1
         43        DO_ICALL                                         $23     
         44        SUB                                              ~24     $23, !0
         45        SEND_VAL                                                 ~24
         46        DO_ICALL                                                 
         47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.57 ms | 1405 KiB | 17 Q