3v4l.org

run code in 300+ PHP versions simultaneously
<?php function vztah ($sef, $callback) { echo "sef: " . $sef; $callback(); } $smradek = "SMRADEK"; vztah("JA", function($x) use ($smradek){ echo "Terka"; echo "$x"; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hl1fg
function name:  (null)
number of ops:  8
compiled vars:  !0 = $smradek
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'SMRADEK'
   13     1        INIT_FCALL                                               'vztah'
          2        SEND_VAL                                                 'JA'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHl1fg%3A13%240'
          4        BIND_LEXICAL                                             ~2, !0
   19     5        SEND_VAL                                                 ~2
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function vztah:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hl1fg
function name:  vztah
number of ops:  7
compiled vars:  !0 = $sef, !1 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        CONCAT                                           ~2      'sef%3A+', !0
          3        ECHO                                                     ~2
    8     4        INIT_DYNAMIC_CALL                                        !1
          5        DO_FCALL                                      0          
    9     6      > RETURN                                                   null

End of function vztah

Function %00%7Bclosure%7D%2Fin%2FHl1fg%3A13%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hl1fg
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $x, !1 = $smradek
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   16     2        ECHO                                                     'Terka'
   17     3        CAST                                          6  ~2      !0
          4        ECHO                                                     ~2
   19     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FHl1fg%3A13%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.55 ms | 1389 KiB | 14 Q