3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeClass extends PHPUnit_Framework_TestCase { function f2member($a,$b) { return $a + $b; } /** * @test */ public function trace2member() { $g = array($this,'f2member'); $this->assertEquals(2, $g(1,1)); // squiggle line under $g } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vn68v
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'someclass', 'phpunit_framework_testcase'
   18     1      > RETURN                                                   1

Class SomeClass:
Function f2member:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vn68v
function name:  f2member
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        ADD                                              ~2      !0, !1
          3      > RETURN                                                   ~2
    8     4*     > RETURN                                                   null

End of function f2member

Function trace2member:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vn68v
function name:  trace2member
number of ops:  13
compiled vars:  !0 = $g
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_THIS                                       ~1      
          1        INIT_ARRAY                                       ~2      ~1
          2        ADD_ARRAY_ELEMENT                                ~2      'f2member'
          3        ASSIGN                                                   !0, ~2
   16     4        INIT_METHOD_CALL                                         'assertEquals'
          5        SEND_VAL_EX                                              2
          6        INIT_DYNAMIC_CALL                                        !0
          7        SEND_VAL_EX                                              1
          8        SEND_VAL_EX                                              1
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR_NO_REF_EX                                       $4
         11        DO_FCALL                                      0          
   17    12      > RETURN                                                   null

End of function trace2member

End of class SomeClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.45 ms | 1398 KiB | 13 Q