3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['foo-test' => [1], '-' => [2], 'bar-test' => [3]]; uksort($a, function($x, $y) use (&$a) { if (!isset($a[$x])) { throw new Exception("Key '{$x}' not found."); } if (!isset($a[$y])) { throw new Exception("Key '{$y}' not found."); } return $x < $y; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4X2HA
function name:  (null)
number of ops:  8
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%2F4X2HA%3A4%240'
          4        BIND_LEXICAL                                             ~2, !0
   14     5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F4X2HA%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 23
Branch analysis from position: 16
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4X2HA
function name:  {closure}
number of ops:  26
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      
          2        BIND_STATIC                                              !2
    5     3        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      !2, !0
          4        BOOL_NOT                                         ~4      ~3
          5      > JMPZ                                                     ~4, ->13
    6     6    >   NEW                                              $5      'Exception'
          7        ROPE_INIT                                     3  ~7      'Key+%27'
          8        ROPE_ADD                                      1  ~7      ~7, !0
          9        ROPE_END                                      2  ~6      ~7, '%27+not+found.'
         10        SEND_VAL_EX                                              ~6
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $5
    9    13    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~10     !2, !1
         14        BOOL_NOT                                         ~11     ~10
         15      > JMPZ                                                     ~11, ->23
   10    16    >   NEW                                              $12     'Exception'
         17        ROPE_INIT                                     3  ~14     'Key+%27'
         18        ROPE_ADD                                      1  ~14     ~14, !1
         19        ROPE_END                                      2  ~13     ~14, '%27+not+found.'
         20        SEND_VAL_EX                                              ~13
         21        DO_FCALL                                      0          
         22      > THROW                                         0          $12
   13    23    >   IS_SMALLER                                       ~17     !0, !1
         24      > RETURN                                                   ~17
   14    25*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.49 ms | 1388 KiB | 15 Q