3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hello($nice, $callback) { $sweet = "sweet"; $callback($sweet); echo $nice; } hello("nice ", function($response){ echo 'can php do dis?'. $response; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SUB4R
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'hello'
          1        SEND_VAL                                                 'nice+'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSUB4R%3A10%240'
   14     3        SEND_VAL                                                 ~0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function hello

Function %00%7Bclosure%7D%2Fin%2FSUB4R%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SUB4R
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $response
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        CONCAT                                           ~1      'can+php+do+dis%3F', !0
          2        ECHO                                                     ~1
   14     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSUB4R%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.25 ms | 1398 KiB | 14 Q