3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A\B; $a = [['x'], ['y'], ['z1'], 1, 2, 3, 4, 5, 'some text']; $time = microtime(true); for ($i=0; $i<1000000; $i++) { \count($a); } echo (microtime(true) - $time) . "\n"; $time = microtime(true); for ($i=0; $i<1000000; $i++) { count($a); } echo (microtime(true) - $time) . "\n";
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 = 7
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 24
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 24
Branch analysis from position: 30
Branch analysis from position: 24
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 7
Branch analysis from position: 12
Branch analysis from position: 7
filename:       /in/QaY2t
function name:  (null)
number of ops:  37
compiled vars:  !0 = $a, !1 = $time, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_NS_FCALL_BY_NAME                                    'A%5CB%5Cmicrotime'
          2        SEND_VAL_EX                                              <true>
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !1, $4
    9     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->10
   10     7    >   COUNT                                            ~7      !0
          8        FREE                                                     ~7
    9     9        PRE_INC                                                  !2
         10    >   IS_SMALLER                                               !2, 1000000
         11      > JMPNZ                                                    ~9, ->7
   13    12    >   INIT_NS_FCALL_BY_NAME                                    'A%5CB%5Cmicrotime'
         13        SEND_VAL_EX                                              <true>
         14        DO_FCALL                                      0  $10     
         15        SUB                                              ~11     $10, !1
         16        CONCAT                                           ~12     ~11, '%0A'
         17        ECHO                                                     ~12
   16    18        INIT_NS_FCALL_BY_NAME                                    'A%5CB%5Cmicrotime'
         19        SEND_VAL_EX                                              <true>
         20        DO_FCALL                                      0  $13     
         21        ASSIGN                                                   !1, $13
   18    22        ASSIGN                                                   !2, 0
         23      > JMP                                                      ->28
   19    24    >   INIT_NS_FCALL_BY_NAME                                    'A%5CB%5Ccount'
         25        SEND_VAR_EX                                              !0
         26        DO_FCALL                                      0          
   18    27        PRE_INC                                                  !2
         28    >   IS_SMALLER                                               !2, 1000000
         29      > JMPNZ                                                    ~18, ->24
   22    30    >   INIT_NS_FCALL_BY_NAME                                    'A%5CB%5Cmicrotime'
         31        SEND_VAL_EX                                              <true>
         32        DO_FCALL                                      0  $19     
         33        SUB                                              ~20     $19, !1
         34        CONCAT                                           ~21     ~20, '%0A'
         35        ECHO                                                     ~21
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.98 ms | 1465 KiB | 15 Q