3v4l.org

run code in 300+ PHP versions simultaneously
<?php $closure = "tham số 1 của closure"; $b = 'tham số 2 của closure '; $ham = function() use ($closure, $b ) { echo "closure gồm 2 tham số: ".$closure." - ".$b; }; echo $ham(); echo gettype($ham);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ko5FX
function name:  (null)
number of ops:  12
compiled vars:  !0 = $closure, !1 = $b, !2 = $ham
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'tham+s%E1%BB%91+1+c%E1%BB%A7a+closure'
    4     1        ASSIGN                                                   !1, 'tham+s%E1%BB%91+2+c%E1%BB%A7a+closure+'
    6     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fko5FX%3A6%240'
          3        BIND_LEXICAL                                             ~5, !0
          4        BIND_LEXICAL                                             ~5, !1
          5        ASSIGN                                                   !2, ~5
   13     6        INIT_DYNAMIC_CALL                                        !2
          7        DO_FCALL                                      0  $7      
          8        ECHO                                                     $7
   15     9        GET_TYPE                                         ~8      !2
         10        ECHO                                                     ~8
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fko5FX%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ko5FX
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $closure, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_STATIC                                              !0
          1        BIND_STATIC                                              !1
    9     2        CONCAT                                           ~2      'closure+g%E1%BB%93m+2+tham+s%E1%BB%91%3A+', !0
          3        CONCAT                                           ~3      ~2, '+-+'
          4        CONCAT                                           ~4      ~3, !1
          5        ECHO                                                     ~4
   11     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fko5FX%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.51 ms | 1394 KiB | 13 Q