3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class SkipUsedViaCompact { public function run($value) { return function () use ($value) { $v = compact('value'); return $v; }; } } $a = new SkipUsedViaCompact(); var_dump($a->run(1)());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9vhce
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'SkipUsedViaCompact'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'run'
          5        SEND_VAL_EX                                              1
          6        DO_FCALL                                      0  $4      
          7        INIT_DYNAMIC_CALL                                        $4
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class SkipUsedViaCompact:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9vhce
function name:  run
number of ops:  5
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          2        BIND_LEXICAL                                             ~1, !0
   11     3      > RETURN                                                   ~1
   12     4*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9vhce
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $value, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BIND_STATIC                                              !0
    8     1        INIT_FCALL                                               'compact'
          2        SEND_VAL                                                 'value'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !1, $2
   10     5      > RETURN                                                   !1
   11     6*     > RETURN                                                   null

End of Dynamic Function 0

End of function run

End of class SkipUsedViaCompact.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.57 ms | 1004 KiB | 15 Q