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 '<pre>'; print_r($Foo); echo '</pre>'; 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/B6Zeq
function name:  (null)
number of ops:  21
compiled vars:  !0 = $Foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FB6Zeq%3A2%240'
   14     1        INIT_USER_CALL                                0          'call_user_func', ~1
          2        DO_FCALL                                      0  $2      
    2     3        ASSIGN                                                   !0, $2
   15     4        ECHO                                                     '%3Cpre%3E'
   16     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   17     8        ECHO                                                     '%3C%2Fpre%3E'
   18     9        INIT_FCALL                                               'implode'
         10        SEND_VAL                                                 '+'
         11        INIT_METHOD_CALL                                         !0, 'a'
         12        DO_FCALL                                      0  $5      
         13        INIT_ARRAY                                       ~6      $5
         14        INIT_METHOD_CALL                                         !0, 'b'
         15        DO_FCALL                                      0  $7      
         16        ADD_ARRAY_ELEMENT                                ~6      $7
         17        SEND_VAL                                                 ~6
         18        DO_ICALL                                         $8      
         19        ECHO                                                     $8
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FB6Zeq%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B6Zeq
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%2FB6Zeq%3A3%241'
          1        ASSIGN                                                   !0, ~2
    6     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FB6Zeq%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%2FB6Zeq%3A2%240

Function %00%7Bclosure%7D%2Fin%2FB6Zeq%3A3%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B6Zeq
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%2FB6Zeq%3A3%241

Function %00%7Bclosure%7D%2Fin%2FB6Zeq%3A6%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B6Zeq
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%2FB6Zeq%3A6%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.86 ms | 1392 KiB | 17 Q