3v4l.org

run code in 300+ PHP versions simultaneously
<?php $duzeLitery = function ($txt) { return strtoupper($txt); }; $v1 = $duzeLitery('test'); // TEST $v2 = (function($txt){ return strtoupper($txt); })('test'); // TEST var_dump($v1); var_dump($v2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UFNJ5
function name:  (null)
number of ops:  18
compiled vars:  !0 = $duzeLitery, !1 = $v1, !2 = $v2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FUFNJ5%3A3%240'
          1        ASSIGN                                                   !0, ~3
    7     2        INIT_DYNAMIC_CALL                                        !0
          3        SEND_VAL_EX                                              'test'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
    8     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FUFNJ5%3A8%241'
   10     7        INIT_DYNAMIC_CALL                                        ~7
          8        SEND_VAL_EX                                              'test'
          9        DO_FCALL                                      0  $8      
    8    10        ASSIGN                                                   !2, $8
   12    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   13    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FUFNJ5%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UFNJ5
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $txt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'strtoupper'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
    5     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FUFNJ5%3A3%240

Function %00%7Bclosure%7D%2Fin%2FUFNJ5%3A8%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UFNJ5
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $txt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'strtoupper'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   10     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FUFNJ5%3A8%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.9 ms | 1396 KiB | 17 Q