3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['foo-test' => [1], '-' => [2], 'bar-test' => [3]]; uksort($a, function($x, $y) { if (!isset($a[$x])) { throw new Exception("$x"); } if (!isset($a[$y])) { throw new Exception("$y"); } return $x < $y; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NeXYi
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'uksort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNeXYi%3A4%240'
   14     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNeXYi%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NeXYi
function name:  {closure}
number of ops:  21
compiled vars:  !0 = $x, !1 = $y, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      !2, !0
          3        BOOL_NOT                                         ~4      ~3
          4      > JMPZ                                                     ~4, ->10
    6     5    >   NEW                                              $5      'Exception'
          6        CAST                                          6  ~6      !0
          7        SEND_VAL_EX                                              ~6
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $5
    9    10    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~8      !2, !1
         11        BOOL_NOT                                         ~9      ~8
         12      > JMPZ                                                     ~9, ->18
   10    13    >   NEW                                              $10     'Exception'
         14        CAST                                          6  ~11     !1
         15        SEND_VAL_EX                                              ~11
         16        DO_FCALL                                      0          
         17      > THROW                                         0          $10
   13    18    >   IS_SMALLER                                       ~13     !0, !1
         19      > RETURN                                                   ~13
   14    20*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNeXYi%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.62 ms | 1396 KiB | 15 Q