3v4l.org

run code in 300+ PHP versions simultaneously
<?php function respond($url, $callback) { $url = $url . 'ABC';// do something with url $service = 'something'; $callback($service); } respond('/users/test', function($service) { var_dump($service); });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QYmPb
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'respond'
          1        SEND_VAL                                                 '%2Fusers%2Ftest'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQYmPb%3A11%240'
   13     3        SEND_VAL                                                 ~0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function respond

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

End of function %00%7Bclosure%7D%2Fin%2FQYmPb%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.81 ms | 1402 KiB | 16 Q