3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function bar() {} } $foo = new Foo(); $arr = array('1', '2', '3'); uasort($arr, function($a, $b) use ($foo) { return $a - $b; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kkHuI
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   11     3        ASSIGN                                                   !1, <array>
   13     4        INIT_FCALL                                               'uasort'
          5        SEND_REF                                                 !1
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkkHuI%3A13%240'
          7        BIND_LEXICAL                                             ~6, !0
   15     8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FkkHuI%3A13%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kkHuI
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $a, !1 = $b, !2 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   14     3        SUB                                              ~3      !0, !1
          4      > RETURN                                                   ~3
   15     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkkHuI%3A13%240

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.29 ms | 1395 KiB | 15 Q