3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 1 <=> 1; // 0 echo 1 <=> 2; // -1 echo 2 <=> 1; // 1 $array = [3,2,1]; usort($array, function($x, $y) { return $x <=> $y; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eNcdK
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     0
    4     1        ECHO                                                     -1
    5     2        ECHO                                                     1
    7     3        ASSIGN                                                   !0, <array>
    8     4        INIT_FCALL                                               'usort'
          5        SEND_REF                                                 !0
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FeNcdK%3A8%240'
   10     7        SEND_VAL                                                 ~2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FeNcdK%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eNcdK
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        SPACESHIP                                        ~2      !0, !1
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FeNcdK%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.64 ms | 1395 KiB | 15 Q