3v4l.org

run code in 300+ PHP versions simultaneously
<?php $in = ["War and Peace", "Reading Rainbow: The Best Unicorn Ever", "Maus", "Home for a Bunny"]; for(;list($k,$w)=each($in);$S[]=$w){ for($l=$i=mb_strlen($w);$i--;){ $c=array_sum(unpack("C*",mb_substr($w,$i,1))); 96<$c&&$c<123 and $v+=$c-96 or 64<$c&&$c<91 and $v+=1.5*$c-96 or 48<$c&&$c>32||$c>57&&$c<127 and $v-=1; } $v=$v/$l; preg_match_all("/\d+/",$w,$m); $v-=array_sum($m[0]); preg_match("/((^| )R.*){2}/",$w)&&$v=-1^1<<63; $t[]=$v; } array_multisort($t,$S); echo join(~ß,$S);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 80
Branch analysis from position: 80
2 jumps found. (Code = 44) Position 1 = 88, Position 2 = 2
Branch analysis from position: 88
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
2 jumps found. (Code = 44) Position 1 = 57, Position 2 = 8
Branch analysis from position: 57
2 jumps found. (Code = 46) Position 1 = 74, Position 2 = 76
Branch analysis from position: 74
2 jumps found. (Code = 44) Position 1 = 88, Position 2 = 2
Branch analysis from position: 88
Branch analysis from position: 2
Branch analysis from position: 76
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
2 jumps found. (Code = 46) Position 1 = 26, Position 2 = 29
Branch analysis from position: 26
2 jumps found. (Code = 47) Position 1 = 30, Position 2 = 40
Branch analysis from position: 30
2 jumps found. (Code = 46) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
2 jumps found. (Code = 46) Position 1 = 35, Position 2 = 39
Branch analysis from position: 35
2 jumps found. (Code = 47) Position 1 = 41, Position 2 = 55
Branch analysis from position: 41
2 jumps found. (Code = 46) Position 1 = 43, Position 2 = 45
Branch analysis from position: 43
2 jumps found. (Code = 47) Position 1 = 46, Position 2 = 51
Branch analysis from position: 46
2 jumps found. (Code = 46) Position 1 = 48, Position 2 = 50
Branch analysis from position: 48
2 jumps found. (Code = 46) Position 1 = 52, Position 2 = 54
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 57, Position 2 = 8
Branch analysis from position: 57
Branch analysis from position: 8
Branch analysis from position: 54
Branch analysis from position: 50
Branch analysis from position: 51
Branch analysis from position: 45
Branch analysis from position: 55
Branch analysis from position: 39
Branch analysis from position: 34
Branch analysis from position: 40
Branch analysis from position: 29
Branch analysis from position: 25
filename:       /in/c8Jk2
function name:  (null)
number of ops:  100
compiled vars:  !0 = $in, !1 = $l, !2 = $i, !3 = $w, !4 = $c, !5 = $v, !6 = $m, !7 = $t, !8 = $S, !9 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1      > JMP                                                      ->80
    8     2    >   INIT_FCALL                                               'mb_strlen'
          3        SEND_VAR                                                 !3
          4        DO_ICALL                                         $11     
          5        ASSIGN                                           ~12     !2, $11
          6        ASSIGN                                                   !1, ~12
          7      > JMP                                                      ->55
    9     8    >   INIT_FCALL                                               'array_sum'
          9        INIT_FCALL                                               'unpack'
         10        SEND_VAL                                                 'C%2A'
         11        INIT_FCALL                                               'mb_substr'
         12        SEND_VAR                                                 !3
         13        SEND_VAR                                                 !2
         14        SEND_VAL                                                 1
         15        DO_ICALL                                         $14     
         16        SEND_VAR                                                 $14
         17        DO_ICALL                                         $15     
         18        SEND_VAR                                                 $15
         19        DO_ICALL                                         $16     
         20        ASSIGN                                                   !4, $16
   10    21        IS_SMALLER                                       ~18     96, !4
         22      > JMPZ_EX                                          ~18     ~18, ->25
         23    >   IS_SMALLER                                       ~19     !4, 123
         24        BOOL                                             ~18     ~19
         25    > > JMPZ_EX                                          ~18     ~18, ->29
         26    >   SUB                                              ~20     !4, 96
         27        ASSIGN_OP                                     1  ~21     !5, ~20
         28        BOOL                                             ~18     ~21
         29    > > JMPNZ_EX                                         ~18     ~18, ->40
         30    >   IS_SMALLER                                       ~22     64, !4
         31      > JMPZ_EX                                          ~22     ~22, ->34
         32    >   IS_SMALLER                                       ~23     !4, 91
         33        BOOL                                             ~22     ~23
         34    > > JMPZ_EX                                          ~22     ~22, ->39
         35    >   MUL                                              ~24     !4, 1.5
         36        SUB                                              ~25     ~24, 96
         37        ASSIGN_OP                                     1  ~26     !5, ~25
         38        BOOL                                             ~22     ~26
         39    >   BOOL                                             ~18     ~22
         40    > > JMPNZ_EX                                         ~18     ~18, ->55
         41    >   IS_SMALLER                                       ~27     48, !4
         42      > JMPZ_EX                                          ~27     ~27, ->45
         43    >   IS_SMALLER                                       ~28     32, !4
         44        BOOL                                             ~27     ~28
         45    > > JMPNZ_EX                                         ~27     ~27, ->51
         46    >   IS_SMALLER                                       ~29     57, !4
         47      > JMPZ_EX                                          ~29     ~29, ->50
         48    >   IS_SMALLER                                       ~30     !4, 127
         49        BOOL                                             ~29     ~30
         50    >   BOOL                                             ~27     ~29
         51    > > JMPZ_EX                                          ~27     ~27, ->54
         52    >   ASSIGN_OP                                     2  ~31     !5, 1
         53        BOOL                                             ~27     ~31
         54    >   BOOL                                             ~18     ~27
    8    55    >   POST_DEC                                         ~32     !2
         56      > JMPNZ                                                    ~32, ->8
   12    57    >   DIV                                              ~33     !5, !1
         58        ASSIGN                                                   !5, ~33
   13    59        INIT_FCALL                                               'preg_match_all'
         60        SEND_VAL                                                 '%2F%5Cd%2B%2F'
         61        SEND_VAR                                                 !3
         62        SEND_REF                                                 !6
         63        DO_ICALL                                                 
   14    64        INIT_FCALL                                               'array_sum'
         65        FETCH_DIM_R                                      ~36     !6, 0
         66        SEND_VAL                                                 ~36
         67        DO_ICALL                                         $37     
         68        ASSIGN_OP                                     2          !5, $37
   15    69        INIT_FCALL                                               'preg_match'
         70        SEND_VAL                                                 '%2F%28%28%5E%7C+%29R.%2A%29%7B2%7D%2F'
         71        SEND_VAR                                                 !3
         72        DO_ICALL                                         $39     
         73      > JMPZ_EX                                          ~40     $39, ->76
         74    >   ASSIGN                                           ~41     !5, 9223372036854775807
         75        BOOL                                             ~40     ~41
   16    76    >   ASSIGN_DIM                                               !7
         77        OP_DATA                                                  !5
    7    78        ASSIGN_DIM                                               !8
         79        OP_DATA                                                  !3
         80    >   INIT_FCALL_BY_NAME                                       'each'
         81        SEND_VAR_EX                                              !0
         82        DO_FCALL                                      0  $44     
         83        FETCH_LIST_R                                     $45     $44, 0
         84        ASSIGN                                                   !9, $45
         85        FETCH_LIST_R                                     $47     $44, 1
         86        ASSIGN                                                   !3, $47
         87      > JMPNZ                                                    $44, ->2
   18    88    >   INIT_FCALL                                               'array_multisort'
         89        SEND_REF                                                 !7
         90        SEND_REF                                                 !8
         91        DO_ICALL                                                 
   19    92        INIT_FCALL                                               'join'
         93        FETCH_CONSTANT                                   ~50     '%C3%9F'
         94        BW_NOT                                           ~51     ~50
         95        SEND_VAL                                                 ~51
         96        SEND_VAR                                                 !8
         97        DO_ICALL                                         $52     
         98        ECHO                                                     $52
         99      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.73 ms | 1404 KiB | 32 Q