3v4l.org

run code in 500+ 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); }
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/1DeC6
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
    6     5    >   DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          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


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1DeC6
function name:  {closure:/in/1DeC6:6}
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.35 ms | 3698 KiB | 10 Q