3v4l.org

run code in 500+ PHP versions simultaneously
<?php $consts = get_defined_constants(); $consts = array_keys($consts); usort($consts, function($a, $b) { $aLen = strlen($a); $bLen = strlen($b); if ($aLen === $bLen) { return 0; } return $aLen < $bLen ? 1 : -1; }); foreach($consts as $const) { echo strlen($const) . ": " . $const . "\n"; }

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/UScFO
function name:  (null)
number of ops:  22
compiled vars:  !0 = $consts, !1 = $const
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                                   'get_defined_constants'
          1        DO_ICALL                                             $2      
          2        ASSIGN                                                       !0, $2
    3     3        INIT_FCALL                                                   'array_keys'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $4      
          6        ASSIGN                                                       !0, $4
    4     7        INIT_FCALL                                                   'usort'
          8        SEND_REF                                                     !0
          9        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
   11    10        SEND_VAL                                                     ~6
    4    11        DO_ICALL                                                     
   12    12      > FE_RESET_R                                           $8      !0, ->20
         13    > > FE_FETCH_R                                                   $8, !1, ->20
   13    14    >   STRLEN                                               ~9      !1
         15        CONCAT                                               ~10     ~9, '%3A+'
         16        CONCAT                                               ~11     ~10, !1
         17        CONCAT                                               ~12     ~11, '%0A'
         18        ECHO                                                         ~12
   12    19      > JMP                                                          ->13
         20    >   FE_FREE                                                      $8
   14    21      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UScFO
function name:  {closure:/in/UScFO:4}
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $aLen, !3 = $bLen
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    5     2        STRLEN                                               ~4      !0
          3        ASSIGN                                                       !2, ~4
    6     4        STRLEN                                               ~6      !1
          5        ASSIGN                                                       !3, ~6
    7     6        IS_IDENTICAL                                                 !2, !3
          7      > JMPZ                                                         ~8, ->9
    8     8    > > RETURN                                                       0
   10     9    >   IS_SMALLER                                                   !2, !3
         10      > JMPZ                                                         ~9, ->13
         11    >   QM_ASSIGN                                            ~10     1
         12      > JMP                                                          ->14
         13    >   QM_ASSIGN                                            ~10     -1
         14    > > RETURN                                                       ~10
   11    15*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
194.79 ms | 7388 KiB | 16 Q