3v4l.org

run code in 300+ PHP versions simultaneously
<?php call_user_func(function(){ echo 'val_val' . PHP_EOL; $a = "xxx"; $b = $a; $c = $b; ob_start(function ($s) { return preg_replace('/^/m', " ", $s); }); xdebug_debug_zval('a', 'b', 'c'); ob_end_flush(); }); call_user_func(function(){ echo 'ref_val' . PHP_EOL; $a = "xxx"; $b = &$a; $c = $b; ob_start(function ($s) { return preg_replace('/^/m', " ", $s); }); xdebug_debug_zval('a', 'b', 'c'); ob_end_flush(); }); call_user_func(function(){ echo 'val_ref' . PHP_EOL; $a = "xxx"; $b = $a; $c = &$b; ob_start(function ($s) { return preg_replace('/^/m', " ", $s); }); xdebug_debug_zval('a', 'b', 'c'); ob_end_flush(); }); call_user_func(function(){ echo 'ref_ref' . PHP_EOL; $a = "xxx"; $b = &$a; $c = &$b; ob_start(function ($s) { return preg_replace('/^/m', " ", $s); }); xdebug_debug_zval('a', 'b', 'c'); ob_end_flush(); });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMhs
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FntMhs%3A2%240'
   12     1        INIT_USER_CALL                                0          'call_user_func', ~0
          2        DO_FCALL                                      0          
   14     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FntMhs%3A14%242'
   24     4        INIT_USER_CALL                                0          'call_user_func', ~2
          5        DO_FCALL                                      0          
   26     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FntMhs%3A26%244'
   36     7        INIT_USER_CALL                                0          'call_user_func', ~4
          8        DO_FCALL                                      0          
   38     9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FntMhs%3A38%246'
   48    10        INIT_USER_CALL                                0          'call_user_func', ~6
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FntMhs%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMhs
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'val_val%0A'
    5     1        ASSIGN                                                   !0, 'xxx'
    6     2        ASSIGN                                                   !1, !0
    7     3        ASSIGN                                                   !2, !1
    9     4        INIT_FCALL                                               'ob_start'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FntMhs%3A9%241'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                                 
   10     8        INIT_FCALL_BY_NAME                                       'xdebug_debug_zval'
          9        SEND_VAL_EX                                              'a'
         10        SEND_VAL_EX                                              'b'
         11        SEND_VAL_EX                                              'c'
         12        DO_FCALL                                      0          
   11    13        INIT_FCALL                                               'ob_end_flush'
         14        DO_ICALL                                                 
   12    15      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FntMhs%3A2%240

Function %00%7Bclosure%7D%2Fin%2FntMhs%3A9%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMhs
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5E%2Fm'
          3        SEND_VAL                                                 '++'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FntMhs%3A9%241

Function %00%7Bclosure%7D%2Fin%2FntMhs%3A14%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMhs
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'ref_val%0A'
   17     1        ASSIGN                                                   !0, 'xxx'
   18     2        ASSIGN_REF                                               !1, !0
   19     3        ASSIGN                                                   !2, !1
   21     4        INIT_FCALL                                               'ob_start'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FntMhs%3A21%243'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                                 
   22     8        INIT_FCALL_BY_NAME                                       'xdebug_debug_zval'
          9        SEND_VAL_EX                                              'a'
         10        SEND_VAL_EX                                              'b'
         11        SEND_VAL_EX                                              'c'
         12        DO_FCALL                                      0          
   23    13        INIT_FCALL                                               'ob_end_flush'
         14        DO_ICALL                                                 
   24    15      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FntMhs%3A14%242

Function %00%7Bclosure%7D%2Fin%2FntMhs%3A21%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMhs
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5E%2Fm'
          3        SEND_VAL                                                 '++'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FntMhs%3A21%243

Function %00%7Bclosure%7D%2Fin%2FntMhs%3A26%244:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMhs
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   ECHO                                                     'val_ref%0A'
   29     1        ASSIGN                                                   !0, 'xxx'
   30     2        ASSIGN                                                   !1, !0
   31     3        ASSIGN_REF                                               !2, !1
   33     4        INIT_FCALL                                               'ob_start'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FntMhs%3A33%245'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                                 
   34     8        INIT_FCALL_BY_NAME                                       'xdebug_debug_zval'
          9        SEND_VAL_EX                                              'a'
         10        SEND_VAL_EX                                              'b'
         11        SEND_VAL_EX                                              'c'
         12        DO_FCALL                                      0          
   35    13        INIT_FCALL                                               'ob_end_flush'
         14        DO_ICALL                                                 
   36    15      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FntMhs%3A26%244

Function %00%7Bclosure%7D%2Fin%2FntMhs%3A33%245:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMhs
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5E%2Fm'
          3        SEND_VAL                                                 '++'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FntMhs%3A33%245

Function %00%7Bclosure%7D%2Fin%2FntMhs%3A38%246:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMhs
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   ECHO                                                     'ref_ref%0A'
   41     1        ASSIGN                                                   !0, 'xxx'
   42     2        ASSIGN_REF                                               !1, !0
   43     3        ASSIGN_REF                                               !2, !1
   45     4        INIT_FCALL                                               'ob_start'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FntMhs%3A45%247'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                                 
   46     8        INIT_FCALL_BY_NAME                                       'xdebug_debug_zval'
          9        SEND_VAL_EX                                              'a'
         10        SEND_VAL_EX                                              'b'
         11        SEND_VAL_EX                                              'c'
         12        DO_FCALL                                      0          
   47    13        INIT_FCALL                                               'ob_end_flush'
         14        DO_ICALL                                                 
   48    15      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FntMhs%3A38%246

Function %00%7Bclosure%7D%2Fin%2FntMhs%3A45%247:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntMhs
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5E%2Fm'
          3        SEND_VAL                                                 '++'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FntMhs%3A45%247

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.98 ms | 1408 KiB | 19 Q