3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public function getClosure() { return 'aaa'; // return function() { //echo 'aaa'; //} } } $test = new test; $closure = $test->getClosure(); //$closure();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fRXdI
function name:  (null)
number of ops:  7
compiled vars:  !0 = $test, !1 = $closure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   14     3        INIT_METHOD_CALL                                         !0, 'getClosure'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   15     6      > RETURN                                                   1

Class test:
Function getclosure:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fRXdI
function name:  getClosure
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'aaa'
   10     1*     > RETURN                                                   null

End of function getclosure

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.9 ms | 1393 KiB | 13 Q