3v4l.org

run code in 300+ PHP versions simultaneously
<?php $elements = 1000; $iterations = 10000; $array = array(); for ($i = 0; $i < $elements; $i++) $array[] = $i; $s = microtime(true); for ($i = 0; $i < $iterations; $i++) $array === (array) $array; $e = microtime(true); echo "Cast completed in " . ($e - $s) ." Seconds\n"; $s = microtime(true); for ($i = 0; $i < $iterations; $i++) is_array($array); $e = microtime(true); echo "is_array completed in " . ($e - $s) ." Seconds\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 = 5
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 16
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 36
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 36
Branch analysis from position: 41
Branch analysis from position: 36
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 16
Branch analysis from position: 22
Branch analysis from position: 16
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/IXCfh
function name:  (null)
number of ops:  50
compiled vars:  !0 = $elements, !1 = $iterations, !2 = $array, !3 = $i, !4 = $s, !5 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1000
    3     1        ASSIGN                                                   !1, 10000
    5     2        ASSIGN                                                   !2, <array>
    6     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->8
          5    >   ASSIGN_DIM                                               !2
          6        OP_DATA                                                  !3
          7        PRE_INC                                                  !3
          8    >   IS_SMALLER                                               !3, !0
          9      > JMPNZ                                                    ~12, ->5
    8    10    >   INIT_FCALL                                               'microtime'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $13     
         13        ASSIGN                                                   !4, $13
    9    14        ASSIGN                                                   !3, 0
         15      > JMP                                                      ->20
         16    >   CAST                                          7  ~16     !2
         17        IS_IDENTICAL                                     ~17     !2, ~16
         18        FREE                                                     ~17
         19        PRE_INC                                                  !3
         20    >   IS_SMALLER                                               !3, !1
         21      > JMPNZ                                                    ~19, ->16
   10    22    >   INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $20     
         25        ASSIGN                                                   !5, $20
   11    26        SUB                                              ~22     !5, !4
         27        CONCAT                                           ~23     'Cast+completed+in+', ~22
         28        CONCAT                                           ~24     ~23, '+Seconds%0A'
         29        ECHO                                                     ~24
   14    30        INIT_FCALL                                               'microtime'
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $25     
         33        ASSIGN                                                   !4, $25
   15    34        ASSIGN                                                   !3, 0
         35      > JMP                                                      ->39
         36    >   TYPE_CHECK                                  128  ~28     !2
         37        FREE                                                     ~28
         38        PRE_INC                                                  !3
         39    >   IS_SMALLER                                               !3, !1
         40      > JMPNZ                                                    ~30, ->36
   16    41    >   INIT_FCALL                                               'microtime'
         42        SEND_VAL                                                 <true>
         43        DO_ICALL                                         $31     
         44        ASSIGN                                                   !5, $31
   17    45        SUB                                              ~33     !5, !4
         46        CONCAT                                           ~34     'is_array+completed+in+', ~33
         47        CONCAT                                           ~35     ~34, '+Seconds%0A'
         48        ECHO                                                     ~35
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.16 ms | 1405 KiB | 15 Q