3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FHKLhr%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HKLhr
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               !0, 'bar'
          2        OP_DATA                                                  'bat'
          3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FHKLhr%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.12 ms | 1395 KiB | 15 Q