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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.46 ms | 1400 KiB | 17 Q