3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myFunction(){ $v = ""; $r = "myvalue"; function($r){ return $v = $r;}; return $v; } var_dump(myFunction());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HFP0E
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'myfunction'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HFP0E
function name:  myFunction
number of ops:  6
compiled vars:  !0 = $v, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, ''
    5     1        ASSIGN                                                   !1, 'myvalue'
    6     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHFP0E%3A6%240'
          3        FREE                                                     ~4
    7     4      > RETURN                                                   !0
    8     5*     > RETURN                                                   null

End of function myfunction

Function %00%7Bclosure%7D%2Fin%2FHFP0E%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HFP0E
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $r, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        ASSIGN                                           ~2      !1, !0
          2      > RETURN                                                   ~2
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FHFP0E%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.99 ms | 1402 KiB | 16 Q