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"; echo 'Global relative difference true to \true ' . sprintf('%f.10', (($g2-$g1)*100)/$g1) . "%\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)*100)/$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 = 62
Branch analysis from position: 62
2 jumps found. (Code = 44) Position 1 = 64, Position 2 = 61
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 84
Branch analysis from position: 84
2 jumps found. (Code = 44) Position 1 = 86, Position 2 = 83
Branch analysis from position: 86
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 83
2 jumps found. (Code = 44) Position 1 = 86, Position 2 = 83
Branch analysis from position: 86
Branch analysis from position: 83
Branch analysis from position: 61
2 jumps found. (Code = 44) Position 1 = 64, Position 2 = 61
Branch analysis from position: 64
Branch analysis from position: 61
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/Qnf90
function name:  (null)
number of ops:  110
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
   26    45        INIT_FCALL                                               'sprintf'
         46        SEND_VAL                                                 '%25f.10'
         47        SUB                                              ~34     !6, !5
         48        MUL                                              ~35     ~34, 100
         49        DIV                                              ~36     ~35, !5
         50        SEND_VAL                                                 ~36
         51        DO_ICALL                                         $37     
         52        CONCAT                                           ~38     'Global+relative+difference+true+to+%5Ctrue+', $37
         53        CONCAT                                           ~39     ~38, '%25%0A'
         54        ECHO                                                     ~39
   30    55        INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         56        SEND_VAL_EX                                              <true>
         57        DO_FCALL                                      0  $40     
         58        ASSIGN                                                   !1, $40
   31    59        ASSIGN                                                   !2, !0
   32    60      > JMP                                                      ->62
   34    61    >   ASSIGN                                                   !3, <true>
   32    62    >   POST_DEC                                         ~44     !2
         63      > JMPNZ                                                    ~44, ->61
   36    64    >   INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         65        SEND_VAL_EX                                              <true>
         66        DO_FCALL                                      0  $45     
         67        ASSIGN                                                   !4, $45
   37    68        SUB                                              ~47     !4, !1
         69        ASSIGN                                                   !7, ~47
   38    70        INIT_NS_FCALL_BY_NAME                                    'foo%5Csprintf'
         71        SEND_VAL_EX                                              '%25f.20'
         72        SEND_VAR_EX                                              !7
         73        DO_FCALL                                      0  $49     
         74        CONCAT                                           ~50     'Namespace+true%3A+', $49
         75        CONCAT                                           ~51     ~50, '%0A'
         76        ECHO                                                     ~51
   40    77        INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         78        SEND_VAL_EX                                              <true>
         79        DO_FCALL                                      0  $52     
         80        ASSIGN                                                   !1, $52
   41    81        ASSIGN                                                   !2, !0
   42    82      > JMP                                                      ->84
   44    83    >   ASSIGN                                                   !3, <true>
   42    84    >   POST_DEC                                         ~56     !2
         85      > JMPNZ                                                    ~56, ->83
   46    86    >   INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         87        SEND_VAL_EX                                              <true>
         88        DO_FCALL                                      0  $57     
         89        ASSIGN                                                   !4, $57
   47    90        SUB                                              ~59     !4, !1
         91        ASSIGN                                                   !8, ~59
   48    92        INIT_NS_FCALL_BY_NAME                                    'foo%5Csprintf'
         93        SEND_VAL_EX                                              '%25f.20'
         94        SEND_VAR_EX                                              !8
         95        DO_FCALL                                      0  $61     
         96        CONCAT                                           ~62     'Namespace+%5Ctrue%3A+', $61
         97        CONCAT                                           ~63     ~62, '%0A'
         98        ECHO                                                     ~63
   50    99        INIT_NS_FCALL_BY_NAME                                    'foo%5Csprintf'
        100        SEND_VAL_EX                                              '%25f.10'
        101        SUB                                              ~64     !8, !7
        102        MUL                                              ~65     ~64, 100
        103        DIV                                              ~66     ~65, !7
        104        SEND_VAL_EX                                              ~66
        105        DO_FCALL                                      0  $67     
        106        CONCAT                                           ~68     'Namespace+relative+difference+true+to+%5Ctrue+', $67
        107        CONCAT                                           ~69     ~68, '%25%0A'
        108        ECHO                                                     ~69
   51   109      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.27 ms | 1396 KiB | 17 Q