3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { $s = 1000; $start = microtime(true); $i = $s; while($i--) { $a = true; } $end = microtime(true); $g1 = $end-$start; echo 'Global true: ' . sprintf('%f.20', $g1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $g2 = $end-$start; echo 'Global \true: ' . sprintf('%f.20', $g2) . "\n"; } namespace foo { $start = microtime(true); $i = $s; while($i--) { $a = true; } $end = microtime(true); $n1 = $end-$start; echo 'Namespace true: ' . sprintf('%f.20', $n1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $n2 = $end-$start; echo 'Namespace \true: ' . sprintf('%f.20', $n2) . "\n"; echo 'Namespace relative difference true to \true ' . sprintf('%f.10', ($n2-$n1)/$n1) . "%\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 7
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 29
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 51
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
2 jumps found. (Code = 44) Position 1 = 76, Position 2 = 73
Branch analysis from position: 76
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 73
2 jumps found. (Code = 44) Position 1 = 76, Position 2 = 73
Branch analysis from position: 76
Branch analysis from position: 73
Branch analysis from position: 51
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 51
Branch analysis from position: 54
Branch analysis from position: 51
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 29
Branch analysis from position: 32
Branch analysis from position: 29
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 7
Branch analysis from position: 10
Branch analysis from position: 7
filename:       /in/rMvMt
function name:  (null)
number of ops:  99
compiled vars:  !0 = $s, !1 = $start, !2 = $i, !3 = $a, !4 = $end, !5 = $g1, !6 = $g2, !7 = $n1, !8 = $n2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 1000
    6     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $10     
          4        ASSIGN                                                   !1, $10
    7     5        ASSIGN                                                   !2, !0
    8     6      > JMP                                                      ->8
   10     7    >   ASSIGN                                                   !3, <true>
    8     8    >   POST_DEC                                         ~14     !2
          9      > JMPNZ                                                    ~14, ->7
   12    10    >   INIT_FCALL                                               'microtime'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $15     
         13        ASSIGN                                                   !4, $15
   13    14        SUB                                              ~17     !4, !1
         15        ASSIGN                                                   !5, ~17
   14    16        INIT_FCALL                                               'sprintf'
         17        SEND_VAL                                                 '%25f.20'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                         $19     
         20        CONCAT                                           ~20     'Global+true%3A+', $19
         21        CONCAT                                           ~21     ~20, '%0A'
         22        ECHO                                                     ~21
   16    23        INIT_FCALL                                               'microtime'
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $22     
         26        ASSIGN                                                   !1, $22
   17    27        ASSIGN                                                   !2, !0
   18    28      > JMP                                                      ->30
   20    29    >   ASSIGN                                                   !3, <true>
   18    30    >   POST_DEC                                         ~26     !2
         31      > JMPNZ                                                    ~26, ->29
   22    32    >   INIT_FCALL                                               'microtime'
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $27     
         35        ASSIGN                                                   !4, $27
   23    36        SUB                                              ~29     !4, !1
         37        ASSIGN                                                   !6, ~29
   24    38        INIT_FCALL                                               'sprintf'
         39        SEND_VAL                                                 '%25f.20'
         40        SEND_VAR                                                 !6
         41        DO_ICALL                                         $31     
         42        CONCAT                                           ~32     'Global+%5Ctrue%3A+', $31
         43        CONCAT                                           ~33     ~32, '%0A'
         44        ECHO                                                     ~33
   28    45        INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         46        SEND_VAL_EX                                              <true>
         47        DO_FCALL                                      0  $34     
         48        ASSIGN                                                   !1, $34
   29    49        ASSIGN                                                   !2, !0
   30    50      > JMP                                                      ->52
   32    51    >   ASSIGN                                                   !3, <true>
   30    52    >   POST_DEC                                         ~38     !2
         53      > JMPNZ                                                    ~38, ->51
   34    54    >   INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         55        SEND_VAL_EX                                              <true>
         56        DO_FCALL                                      0  $39     
         57        ASSIGN                                                   !4, $39
   35    58        SUB                                              ~41     !4, !1
         59        ASSIGN                                                   !7, ~41
   36    60        INIT_NS_FCALL_BY_NAME                                    'foo%5Csprintf'
         61        SEND_VAL_EX                                              '%25f.20'
         62        SEND_VAR_EX                                              !7
         63        DO_FCALL                                      0  $43     
         64        CONCAT                                           ~44     'Namespace+true%3A+', $43
         65        CONCAT                                           ~45     ~44, '%0A'
         66        ECHO                                                     ~45
   38    67        INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         68        SEND_VAL_EX                                              <true>
         69        DO_FCALL                                      0  $46     
         70        ASSIGN                                                   !1, $46
   39    71        ASSIGN                                                   !2, !0
   40    72      > JMP                                                      ->74
   42    73    >   ASSIGN                                                   !3, <true>
   40    74    >   POST_DEC                                         ~50     !2
         75      > JMPNZ                                                    ~50, ->73
   44    76    >   INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         77        SEND_VAL_EX                                              <true>
         78        DO_FCALL                                      0  $51     
         79        ASSIGN                                                   !4, $51
   45    80        SUB                                              ~53     !4, !1
         81        ASSIGN                                                   !8, ~53
   46    82        INIT_NS_FCALL_BY_NAME                                    'foo%5Csprintf'
         83        SEND_VAL_EX                                              '%25f.20'
         84        SEND_VAR_EX                                              !8
         85        DO_FCALL                                      0  $55     
         86        CONCAT                                           ~56     'Namespace+%5Ctrue%3A+', $55
         87        CONCAT                                           ~57     ~56, '%0A'
         88        ECHO                                                     ~57
   47    89        INIT_NS_FCALL_BY_NAME                                    'foo%5Csprintf'
         90        SEND_VAL_EX                                              '%25f.10'
         91        SUB                                              ~58     !8, !7
         92        DIV                                              ~59     ~58, !7
         93        SEND_VAL_EX                                              ~59
         94        DO_FCALL                                      0  $60     
         95        CONCAT                                           ~61     'Namespace+relative+difference+true+to+%5Ctrue+', $60
         96        CONCAT                                           ~62     ~61, '%25%0A'
         97        ECHO                                                     ~62
   48    98      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.65 ms | 1404 KiB | 17 Q