3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo {} class Bar {} class Qux implements Foo {} $bars = [new Bar(), new Bar()]; $quxs = [new Qux(), new Qux()]; usort($bars, function(Foo $a, Foo $b) { return 0; }); var_dump($bars);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KAZtp
function name:  (null)
number of ops:  24
compiled vars:  !0 = $bars, !1 = $quxs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'qux'
    9     1        NEW                                              $2      'Bar'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~4      $2
          4        NEW                                              $5      'Bar'
          5        DO_FCALL                                      0          
          6        ADD_ARRAY_ELEMENT                                ~4      $5
          7        ASSIGN                                                   !0, ~4
   10     8        NEW                                              $8      'Qux'
          9        DO_FCALL                                      0          
         10        INIT_ARRAY                                       ~10     $8
         11        NEW                                              $11     'Qux'
         12        DO_FCALL                                      0          
         13        ADD_ARRAY_ELEMENT                                ~10     $11
         14        ASSIGN                                                   !1, ~10
   12    15        INIT_FCALL                                               'usort'
         16        SEND_REF                                                 !0
         17        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FKAZtp%3A12%241'
         18        SEND_VAL                                                 ~14
         19        DO_ICALL                                                 
   14    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FKAZtp%3A12%241

Class Foo: [no user functions]
Class Bar: [no user functions]
Class Qux: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.83 ms | 1401 KiB | 17 Q