3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Foo = call_user_func(function() { $a = function() { return 'hello'; }; $b = function() { return 'world'; }; return (object)array( 'a' => $a, 'b' => $b, ); }); echo implode(' ', array($Foo->a(), $Foo->b()));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rrI5f
function name:  (null)
number of ops:  16
compiled vars:  !0 = $Foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrrI5f%3A2%240'
   14     1        INIT_USER_CALL                                0          'call_user_func', ~1
          2        DO_FCALL                                      0  $2      
    2     3        ASSIGN                                                   !0, $2
   15     4        INIT_FCALL                                               'implode'
          5        SEND_VAL                                                 '+'
          6        INIT_METHOD_CALL                                         !0, 'a'
          7        DO_FCALL                                      0  $4      
          8        INIT_ARRAY                                       ~5      $4
          9        INIT_METHOD_CALL                                         !0, 'b'
         10        DO_FCALL                                      0  $6      
         11        ADD_ARRAY_ELEMENT                                ~5      $6
         12        SEND_VAL                                                 ~5
         13        DO_ICALL                                         $7      
         14        ECHO                                                     $7
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FrrI5f%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rrI5f
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrrI5f%3A3%241'
          1        ASSIGN                                                   !0, ~2
    6     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrrI5f%3A6%242'
          3        ASSIGN                                                   !1, ~4
   11     4        INIT_ARRAY                                       ~6      !0, 'a'
   12     5        ADD_ARRAY_ELEMENT                                ~6      !1, 'b'
          6        CAST                                          8  ~7      ~6
          7      > RETURN                                                   ~7
   14     8*     > RETURN                                                   null

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

Function %00%7Bclosure%7D%2Fin%2FrrI5f%3A3%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rrI5f
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   'hello'
    5     1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FrrI5f%3A3%241

Function %00%7Bclosure%7D%2Fin%2FrrI5f%3A6%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rrI5f
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'world'
    8     1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FrrI5f%3A6%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.25 ms | 1400 KiB | 15 Q