3v4l.org

run code in 300+ PHP versions simultaneously
<?php // copied from MR $cache_tag_is_valid_count = 0; $cache_tag_invalidation_count = 0; $cache_tag_checksum_count = 0; // simulate actual data to stop 3v4l from complaining $performance_test_data['cache_tag_operations']= []; // NEW: enum CacheTagMetrics { case getCurrentChecksum; case isValid; case invalidateTags; } // CHANGED: foreach ($performance_test_data['cache_tag_operations'] as $operation) { match($operation) { CacheTagMetrics::getCurrentChecksum => $cache_tag_checksum_count++, CacheTagMetrics::isValid => $cache_tag_is_valid_count++, CacheTagMetrics::invalidateTags => $cache_tag_invalidation_count++, }; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 31
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 31
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 23
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 26
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 197) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/VsQ3n
function name:  (null)
number of ops:  33
compiled vars:  !0 = $cache_tag_is_valid_count, !1 = $cache_tag_invalidation_count, !2 = $cache_tag_checksum_count, !3 = $performance_test_data, !4 = $operation
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 0
    6     1        ASSIGN                                                   !1, 0
    7     2        ASSIGN                                                   !2, 0
   10     3        ASSIGN_DIM                                               !3, 'cache_tag_operations'
          4        OP_DATA                                                  <array>
   13     5        DECLARE_CLASS                                            'cachetagmetrics'
   20     6        FETCH_DIM_R                                      ~9      !3, 'cache_tag_operations'
          7      > FE_RESET_R                                       $10     ~9, ->31
          8    > > FE_FETCH_R                                               $10, !4, ->31
   22     9    >   FETCH_CLASS_CONSTANT                             ~12     'CacheTagMetrics', 'getCurrentChecksum'
         10        IS_IDENTICAL                                             !4, ~12
         11      > JMPNZ                                                    ~11, ->20
   23    12    >   FETCH_CLASS_CONSTANT                             ~13     'CacheTagMetrics', 'isValid'
         13        IS_IDENTICAL                                             !4, ~13
         14      > JMPNZ                                                    ~11, ->23
   24    15    >   FETCH_CLASS_CONSTANT                             ~14     'CacheTagMetrics', 'invalidateTags'
         16        IS_IDENTICAL                                             !4, ~14
         17      > JMPNZ                                                    ~11, ->26
         18    > > JMP                                                      ->19
         19    > > MATCH_ERROR                                              !4
   22    20    >   POST_INC                                         ~15     !2
         21        QM_ASSIGN                                        ~16     ~15
         22      > JMP                                                      ->29
   23    23    >   POST_INC                                         ~17     !0
         24        QM_ASSIGN                                        ~16     ~17
         25      > JMP                                                      ->29
   24    26    >   POST_INC                                         ~18     !1
         27        QM_ASSIGN                                        ~16     ~18
         28      > JMP                                                      ->29
         29    >   FREE                                                     ~16
   20    30      > JMP                                                      ->8
         31    >   FE_FREE                                                  $10
   26    32      > RETURN                                                   1

Class CacheTagMetrics: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.96 ms | 1447 KiB | 13 Q