3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { } $t = new Test; $test = (function ($i) { return $i + 1; })->bindTo($t); var_dump($test(2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SCamn
function name:  (null)
number of ops:  15
compiled vars:  !0 = $t, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSCamn%3A10%240'
   12     4        INIT_METHOD_CALL                                         ~5, 'bindTo'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $6      
   10     7        ASSIGN                                                   !1, $6
   14     8        INIT_FCALL                                               'var_dump'
          9        INIT_DYNAMIC_CALL                                        !1
         10        SEND_VAL_EX                                              2
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FSCamn%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SCamn
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ADD                                              ~1      !0, 1
          2      > RETURN                                                   ~1
   12     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSCamn%3A10%240

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.43 ms | 1395 KiB | 15 Q