3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 'a'; $b = 'b'; $testClosure = function($var) use ($a, $b) { echo $var . ' ' . $a . ' ' . $b; }; var_dump($testClosure);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pLWUP
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a, !1 = $b, !2 = $testClosure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'a'
    5     1        ASSIGN                                                   !1, 'b'
    7     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FpLWUP%3A7%240'
          3        BIND_LEXICAL                                             ~5, !0
          4        BIND_LEXICAL                                             ~5, !1
          5        ASSIGN                                                   !2, ~5
   12     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FpLWUP%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pLWUP
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $var, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
    8     3        CONCAT                                           ~3      !0, '+'
          4        CONCAT                                           ~4      ~3, !1
          5        CONCAT                                           ~5      ~4, '+'
          6        CONCAT                                           ~6      ~5, !2
          7        ECHO                                                     ~6
   10     8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FpLWUP%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
191.93 ms | 1399 KiB | 15 Q