3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = (object) ["\0Foo\0bar" => 'baz']; var_dump(Closure::bind(function () { return $this->baz; }, $foo, 'Foo')->__invoke());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ij63S
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~1      <array>
          1        ASSIGN                                                   !0, ~1
    5     2        INIT_FCALL                                               'var_dump'
          3        INIT_STATIC_METHOD_CALL                                  'Closure', 'bind'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fij63S%3A5%240'
    7     5        SEND_VAL                                                 ~3
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 'Foo'
          8        DO_FCALL                                      0  $4      
          9        INIT_METHOD_CALL                                         $4, '__invoke'
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fij63S%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ij63S
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_THIS                                       $0      
          1        FETCH_OBJ_R                                      ~1      $0, 'baz'
          2      > RETURN                                                   ~1
    7     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fij63S%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.58 ms | 1395 KiB | 15 Q