3v4l.org

run code in 300+ PHP versions simultaneously
<?php $m = memory_get_usage(); for ($i = 0; $i < 1000; $i++) { $fn = eval('return function ($foo) {};'); //$fn = function ($foo) {}; var_dump(memory_get_usage() - $m); }

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 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 5
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 5
Branch analysis from position: 16
Branch analysis from position: 5
filename:       /in/LF4Ri
function name:  (null)
number of ops:  17
compiled vars:  !0 = $m, !1 = $i, !2 = $fn
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'memory_get_usage'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    4     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->14
    5     5    >   INCLUDE_OR_EVAL                                  $6      'return+function+%28%24foo%29+%7B%7D%3B', EVAL
          6        ASSIGN                                                   !2, $6
    7     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'memory_get_usage'
          9        DO_ICALL                                         $8      
         10        SUB                                              ~9      $8, !0
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                                 
    4    13        PRE_INC                                                  !1
         14    >   IS_SMALLER                                               !1, 1000
         15      > JMPNZ                                                    ~12, ->5
    8    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.63 ms | 998 KiB | 15 Q