3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = array(); $arr2 = array(); for ($i = 0; $i < 10000000; $i++) { $arr1[$i] = 'a'; $arr2[$i] = 'a'; } $start = microtime(true); for ($i = 0; $i < 10000000; $i++) { $arr1[$i] = null; } $elapsed = microtime(true) - $start; echo 'took '. $elapsed .'seconds<br>'; $start = microtime(true); for ($i = 0; $i < 10000000; $i++) { unset($arr2[$i]); } $elapsed = microtime(true) - $start; echo 'took '. $elapsed .'seconds<br>';

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 17
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 36
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 36
Branch analysis from position: 40
Branch analysis from position: 36
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 17
Branch analysis from position: 22
Branch analysis from position: 17
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
Branch analysis from position: 4
filename:       /in/a6Vap
function name:  (null)
number of ops:  49
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $i, !3 = $start, !4 = $elapsed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->9
    5     4    >   ASSIGN_DIM                                               !0, !2
          5        OP_DATA                                                  'a'
    6     6        ASSIGN_DIM                                               !1, !2
          7        OP_DATA                                                  'a'
    4     8        PRE_INC                                                  !2
          9    >   IS_SMALLER                                               !2, 10000000
         10      > JMPNZ                                                    ~11, ->4
    9    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !3, $12
   10    15        ASSIGN                                                   !2, 0
         16      > JMP                                                      ->20
   11    17    >   ASSIGN_DIM                                               !0, !2
         18        OP_DATA                                                  null
   10    19        PRE_INC                                                  !2
         20    >   IS_SMALLER                                               !2, 10000000
         21      > JMPNZ                                                    ~17, ->17
   13    22    >   INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $18     
         25        SUB                                              ~19     $18, !3
         26        ASSIGN                                                   !4, ~19
   15    27        CONCAT                                           ~21     'took+', !4
         28        CONCAT                                           ~22     ~21, 'seconds%3Cbr%3E'
         29        ECHO                                                     ~22
   17    30        INIT_FCALL                                               'microtime'
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $23     
         33        ASSIGN                                                   !3, $23
   18    34        ASSIGN                                                   !2, 0
         35      > JMP                                                      ->38
   19    36    >   UNSET_DIM                                                !1, !2
   18    37        PRE_INC                                                  !2
         38    >   IS_SMALLER                                               !2, 10000000
         39      > JMPNZ                                                    ~27, ->36
   21    40    >   INIT_FCALL                                               'microtime'
         41        SEND_VAL                                                 <true>
         42        DO_ICALL                                         $28     
         43        SUB                                              ~29     $28, !3
         44        ASSIGN                                                   !4, ~29
   23    45        CONCAT                                           ~31     'took+', !4
         46        CONCAT                                           ~32     ~31, 'seconds%3Cbr%3E'
         47        ECHO                                                     ~32
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.77 ms | 1015 KiB | 14 Q