3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { private $me = 'hey'; } $object = new Test; $weird = function($object) { return $object->me; }; $weird = Closure::bind($weird, null, $object); echo $weird();
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/0qFgJ
function name:  (null)
number of ops:  16
compiled vars:  !0 = $object, !1 = $weird
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   8     1        NEW                                              $3      :-6
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $3
  10     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F0qFgJ0x7f5926287078'
         5        ASSIGN                                                   !1, ~6
  11     6        INIT_STATIC_METHOD_CALL                                  'Closure', 'bind'
         7        SEND_VAR_EX                                              !1
         8        SEND_VAL_EX                                              null
         9        SEND_VAR_EX                                              !0
        10        DO_FCALL                                      0  $8      
        11        ASSIGN                                                   !1, $8
  14    12        INIT_DYNAMIC_CALL                                        !1
        13        DO_FCALL                                      0  $10     
        14        ECHO                                                     $10
        15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F0qFgJ0x7f5926287078:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/0qFgJ
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $object
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  10     0  E >   RECV                                             !0      
         1        FETCH_OBJ_R                                      $1      !0, 'me'
         2      > RETURN                                                   $1
         3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F0qFgJ0x7f5926287078

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 7.1.0