3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { $s = 10000000; $start = microtime(true); $i = $s; while($i--) { $a = true; } $end = microtime(true); $g1 = $end-$start; //echo 'Global true: ' . sprintf('%.20f', $g1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $g2 = $end-$start; //echo 'Global \true: ' . sprintf('%.20f', $g2) . "\n"; echo 'Global relative difference true to \true ' . sprintf('%.10f', (($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('%.20f', $n1) . "\n"; $start = microtime(true); $i = $s; while($i--) { $a = \true; } $end = microtime(true); $n2 = $end-$start; //echo 'Namespace \true: ' . sprintf('%.20f', $n2) . "\n"; echo 'Namespace relative difference true to \true ' . sprintf('%.10f', (($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 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 22
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 47
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 63
Branch analysis from position: 63
2 jumps found. (Code = 44) Position 1 = 65, Position 2 = 62
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 62
2 jumps found. (Code = 44) Position 1 = 65, Position 2 = 62
Branch analysis from position: 65
Branch analysis from position: 62
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 47
Branch analysis from position: 50
Branch analysis from position: 47
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 22
Branch analysis from position: 25
Branch analysis from position: 22
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/cpoWo
function name:  (null)
number of ops:  82
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, 10000000
    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
   16    16        INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $19     
         19        ASSIGN                                                   !1, $19
   17    20        ASSIGN                                                   !2, !0
   18    21      > JMP                                                      ->23
   20    22    >   ASSIGN                                                   !3, <true>
   18    23    >   POST_DEC                                         ~23     !2
         24      > JMPNZ                                                    ~23, ->22
   22    25    >   INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $24     
         28        ASSIGN                                                   !4, $24
   23    29        SUB                                              ~26     !4, !1
         30        ASSIGN                                                   !6, ~26
   26    31        INIT_FCALL                                               'sprintf'
         32        SEND_VAL                                                 '%25.10f'
         33        SUB                                              ~28     !6, !5
         34        MUL                                              ~29     ~28, 100
         35        DIV                                              ~30     ~29, !5
         36        SEND_VAL                                                 ~30
         37        DO_ICALL                                         $31     
         38        CONCAT                                           ~32     'Global+relative+difference+true+to+%5Ctrue+', $31
         39        CONCAT                                           ~33     ~32, '%25%0A'
         40        ECHO                                                     ~33
   30    41        INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         42        SEND_VAL_EX                                              <true>
         43        DO_FCALL                                      0  $34     
         44        ASSIGN                                                   !1, $34
   31    45        ASSIGN                                                   !2, !0
   32    46      > JMP                                                      ->48
   34    47    >   ASSIGN                                                   !3, <true>
   32    48    >   POST_DEC                                         ~38     !2
         49      > JMPNZ                                                    ~38, ->47
   36    50    >   INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         51        SEND_VAL_EX                                              <true>
         52        DO_FCALL                                      0  $39     
         53        ASSIGN                                                   !4, $39
   37    54        SUB                                              ~41     !4, !1
         55        ASSIGN                                                   !7, ~41
   40    56        INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         57        SEND_VAL_EX                                              <true>
         58        DO_FCALL                                      0  $43     
         59        ASSIGN                                                   !1, $43
   41    60        ASSIGN                                                   !2, !0
   42    61      > JMP                                                      ->63
   44    62    >   ASSIGN                                                   !3, <true>
   42    63    >   POST_DEC                                         ~47     !2
         64      > JMPNZ                                                    ~47, ->62
   46    65    >   INIT_NS_FCALL_BY_NAME                                    'foo%5Cmicrotime'
         66        SEND_VAL_EX                                              <true>
         67        DO_FCALL                                      0  $48     
         68        ASSIGN                                                   !4, $48
   47    69        SUB                                              ~50     !4, !1
         70        ASSIGN                                                   !8, ~50
   50    71        INIT_NS_FCALL_BY_NAME                                    'foo%5Csprintf'
         72        SEND_VAL_EX                                              '%25.10f'
         73        SUB                                              ~52     !8, !7
         74        MUL                                              ~53     ~52, 100
         75        DIV                                              ~54     ~53, !7
         76        SEND_VAL_EX                                              ~54
         77        DO_FCALL                                      0  $55     
         78        CONCAT                                           ~56     'Namespace+relative+difference+true+to+%5Ctrue+', $55
         79        CONCAT                                           ~57     ~56, '%25%0A'
         80        ECHO                                                     ~57
   51    81      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.5 ms | 1404 KiB | 17 Q