3v4l.org

run code in 300+ PHP versions simultaneously
<?php $commonNames = ["*.jemoeder.nl", "lekker.jemoeder.nl"]; if(count($commonNames) == 0) { return null; } usort($commonNames, function($a, $b) { $aIsWildcard = strpos($a, "*") === 0; $bIsWildcard = strpos($b, "*") === 0; return $aIsWildcard && $bIsWildcard ? -1 : 1; } ); var_dump($commonNames[0]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9luBv
function name:  (null)
number of ops:  15
compiled vars:  !0 = $commonNames
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        COUNT                                            ~2      !0
          2        IS_EQUAL                                                 ~2, 0
          3      > JMPZ                                                     ~3, ->5
    6     4    > > RETURN                                                   null
    9     5    >   INIT_FCALL                                               'usort'
          6        SEND_REF                                                 !0
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9luBv%3A9%240'
   14     8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
   16    10        INIT_FCALL                                               'var_dump'
         11        FETCH_DIM_R                                      ~6      !0, 0
         12        SEND_VAL                                                 ~6
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9luBv%3A9%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/9luBv
function name:  {closure}
number of ops:  22
compiled vars:  !0 = $a, !1 = $b, !2 = $aIsWildcard, !3 = $bIsWildcard
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '%2A'
          5        DO_ICALL                                         $4      
          6        IS_IDENTICAL                                     ~5      $4, 0
          7        ASSIGN                                                   !2, ~5
   11     8        INIT_FCALL                                               'strpos'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 '%2A'
         11        DO_ICALL                                         $7      
         12        IS_IDENTICAL                                     ~8      $7, 0
         13        ASSIGN                                                   !3, ~8
   13    14      > JMPZ_EX                                          ~10     !2, ->16
         15    >   BOOL                                             ~10     !3
         16    > > JMPZ                                                     ~10, ->19
         17    >   QM_ASSIGN                                        ~11     -1
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~11     1
         20    > > RETURN                                                   ~11
   14    21*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.08 ms | 1405 KiB | 19 Q