3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Klass { } $k = new Klass(); $cb = function() { return 'string'; }; var_dump(array_search($k, array($cb)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pILc7
function name:  (null)
number of ops:  14
compiled vars:  !0 = $k, !1 = $cb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'Klass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    9     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FpILc7%3A9%240'
          4        ASSIGN                                                   !1, ~5
   13     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'array_search'
          7        SEND_VAR                                                 !0
          8        INIT_ARRAY                                       ~7      !1
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                         $8      
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FpILc7%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pILc7
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   'string'
   11     1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FpILc7%3A9%240

Class Klass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.27 ms | 1395 KiB | 17 Q