3v4l.org

run code in 300+ PHP versions simultaneously
<?php function vztah ($sef, $callback) { echo "sef: " . $sef; $callback(); } $smradek = "SMRADEK"; vztah("JA", function($smradek){ echo "Terka"; echo "$smradek"; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FFfn6
function name:  (null)
number of ops:  7
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%2FFFfn6%3A13%240'
   19     4        SEND_VAL                                                 ~2
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.26 ms | 1398 KiB | 14 Q