3v4l.org

run code in 300+ PHP versions simultaneously
<?php function write($str) { echo $str . '<br>'; } $arr = array(); for($i=0;$i<100000;$i++)$arr[$i]=mt_rand(1, 6); // 1~6の乱数を生成 write('*数字の配列を操作'); function i11($arr) { echo '比較演算子1-1', PHP_EOL; $start = microtime(true); for($i=0;$i<100000;++$i)6==$arr[$i]; $end = microtime(true); echo $end - $start, PHP_EOL; } i11($arr); function i12($arr) { echo '比較演算子1-2', PHP_EOL; $start = microtime(true); for($i=0;$i<100000;++$i)6===$arr[$i]; $end = microtime(true); echo $end - $start, PHP_EOL; } i12($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
Branch analysis from position: 3
filename:       /in/gomod
function name:  (null)
number of ops:  22
compiled vars:  !0 = $arr, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->10
          3    >   INIT_FCALL                                               'mt_rand'
          4        SEND_VAL                                                 1
          5        SEND_VAL                                                 6
          6        DO_ICALL                                         $5      
          7        ASSIGN_DIM                                               !0, !1
          8        OP_DATA                                                  $5
          9        PRE_INC                                                  !1
         10    >   IS_SMALLER                                               !1, 100000
         11      > JMPNZ                                                    ~7, ->3
   10    12    >   INIT_FCALL                                               'write'
         13        SEND_VAL                                                 '%2A%E6%95%B0%E5%AD%97%E3%81%AE%E9%85%8D%E5%88%97%E3%82%92%E6%93%8D%E4%BD%9C'
         14        DO_FCALL                                      0          
   18    15        INIT_FCALL                                               'i11'
         16        SEND_VAR                                                 !0
         17        DO_FCALL                                      0          
   26    18        INIT_FCALL                                               'i12'
         19        SEND_VAR                                                 !0
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

Function write:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gomod
function name:  write
number of ops:  4
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        CONCAT                                           ~1      !0, '%3Cbr%3E'
          2        ECHO                                                     ~1
    5     3      > RETURN                                                   null

End of function write

Function i11:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 9
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 9
Branch analysis from position: 15
Branch analysis from position: 9
filename:       /in/gomod
function name:  i11
number of ops:  23
compiled vars:  !0 = $arr, !1 = $start, !2 = $i, !3 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ECHO                                                     '%E6%AF%94%E8%BC%83%E6%BC%94%E7%AE%97%E5%AD%901-1'
          2        ECHO                                                     '%0A'
   13     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   14     7        ASSIGN                                                   !2, 0
          8      > JMP                                                      ->13
          9    >   FETCH_DIM_R                                      ~7      !0, !2
         10        IS_EQUAL                                         ~8      ~7, 6
         11        FREE                                                     ~8
         12        PRE_INC                                                  !2
         13    >   IS_SMALLER                                               !2, 100000
         14      > JMPNZ                                                    ~10, ->9
   15    15    >   INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !3, $11
   16    19        SUB                                              ~13     !3, !1
         20        ECHO                                                     ~13
         21        ECHO                                                     '%0A'
   17    22      > RETURN                                                   null

End of function i11

Function i12:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 9
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 9
Branch analysis from position: 15
Branch analysis from position: 9
filename:       /in/gomod
function name:  i12
number of ops:  23
compiled vars:  !0 = $arr, !1 = $start, !2 = $i, !3 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1        ECHO                                                     '%E6%AF%94%E8%BC%83%E6%BC%94%E7%AE%97%E5%AD%901-2'
          2        ECHO                                                     '%0A'
   21     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   22     7        ASSIGN                                                   !2, 0
          8      > JMP                                                      ->13
          9    >   FETCH_DIM_R                                      ~7      !0, !2
         10        IS_IDENTICAL                                     ~8      ~7, 6
         11        FREE                                                     ~8
         12        PRE_INC                                                  !2
         13    >   IS_SMALLER                                               !2, 100000
         14      > JMPNZ                                                    ~10, ->9
   23    15    >   INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !3, $11
   24    19        SUB                                              ~13     !3, !1
         20        ECHO                                                     ~13
         21        ECHO                                                     '%0A'
   25    22      > RETURN                                                   null

End of function i12

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.25 ms | 1406 KiB | 20 Q