3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Setup $class = 'Concrete5_Model_User'; $count = 1000; // Warm up for($i = 0; $i < $count; $i++) { strpos($class, 'Concrete5_Model'); } // Test - case sensitive $t0 = microtime(true); for($i = 0; $i < $count; $i++) { strpos($class, 'Concrete5_Model'); } $deltaCS = microtime(true) - $t0; // Test - case insensitive $t0 = microtime(true); for($i = 0; $i < $count; $i++) { stripos($class, 'Concrete5_Model'); } $deltaCI = microtime(true) - $t0; echo "case sensitive: $deltaCS\n"; echo "case insensitive: $deltaCI\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 17
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 35
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 35
Branch analysis from position: 42
Branch analysis from position: 35
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 17
Branch analysis from position: 24
Branch analysis from position: 17
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
Branch analysis from position: 4
filename:       /in/XL3Z5
function name:  (null)
number of ops:  56
compiled vars:  !0 = $class, !1 = $count, !2 = $i, !3 = $t0, !4 = $deltaCS, !5 = $deltaCI
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'Concrete5_Model_User'
    5     1        ASSIGN                                                   !1, 1000
    8     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->9
    9     4    >   INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'Concrete5_Model'
          7        DO_ICALL                                                 
    8     8        PRE_INC                                                  !2
          9    >   IS_SMALLER                                               !2, !1
         10      > JMPNZ                                                    ~11, ->4
   13    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !3, $12
   14    15        ASSIGN                                                   !2, 0
         16      > JMP                                                      ->22
   15    17    >   INIT_FCALL                                               'strpos'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 'Concrete5_Model'
         20        DO_ICALL                                                 
   14    21        PRE_INC                                                  !2
         22    >   IS_SMALLER                                               !2, !1
         23      > JMPNZ                                                    ~17, ->17
   17    24    >   INIT_FCALL                                               'microtime'
         25        SEND_VAL                                                 <true>
         26        DO_ICALL                                         $18     
         27        SUB                                              ~19     $18, !3
         28        ASSIGN                                                   !4, ~19
   21    29        INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $21     
         32        ASSIGN                                                   !3, $21
   22    33        ASSIGN                                                   !2, 0
         34      > JMP                                                      ->40
   23    35    >   INIT_FCALL                                               'stripos'
         36        SEND_VAR                                                 !0
         37        SEND_VAL                                                 'Concrete5_Model'
         38        DO_ICALL                                                 
   22    39        PRE_INC                                                  !2
         40    >   IS_SMALLER                                               !2, !1
         41      > JMPNZ                                                    ~26, ->35
   25    42    >   INIT_FCALL                                               'microtime'
         43        SEND_VAL                                                 <true>
         44        DO_ICALL                                         $27     
         45        SUB                                              ~28     $27, !3
         46        ASSIGN                                                   !5, ~28
   27    47        ROPE_INIT                                     3  ~31     'case+sensitive%3A+'
         48        ROPE_ADD                                      1  ~31     ~31, !4
         49        ROPE_END                                      2  ~30     ~31, '%0A'
         50        ECHO                                                     ~30
   28    51        ROPE_INIT                                     3  ~34     'case+insensitive%3A+'
         52        ROPE_ADD                                      1  ~34     ~34, !5
         53        ROPE_END                                      2  ~33     ~34, '%0A'
         54        ECHO                                                     ~33
         55      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.12 ms | 1405 KiB | 19 Q