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); var_dump($S);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 81
Branch analysis from position: 81
2 jumps found. (Code = 44) Position 1 = 89, Position 2 = 2
Branch analysis from position: 89
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 = 75, Position 2 = 77
Branch analysis from position: 75
2 jumps found. (Code = 44) Position 1 = 89, Position 2 = 2
Branch analysis from position: 89
Branch analysis from position: 2
Branch analysis from position: 77
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/TVVJd
function name:  (null)
number of ops:  97
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                                                      ->81
    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    >   FETCH_CONSTANT                                   ~33     'l'
         58        DIV                                              ~34     !5, ~33
         59        ASSIGN                                                   !5, ~34
   13    60        INIT_FCALL                                               'preg_match_all'
         61        SEND_VAL                                                 '%2F%5Cd%2B%2F'
         62        SEND_VAR                                                 !3
         63        SEND_REF                                                 !6
         64        DO_ICALL                                                 
   14    65        INIT_FCALL                                               'array_sum'
         66        FETCH_DIM_R                                      ~37     !6, 0
         67        SEND_VAL                                                 ~37
         68        DO_ICALL                                         $38     
         69        ASSIGN_OP                                     2          !5, $38
   15    70        INIT_FCALL                                               'preg_match'
         71        SEND_VAL                                                 '%2F%28%28%5E%7C+%29R.%2A%29%7B2%7D%2F'
         72        SEND_VAR                                                 !3
         73        DO_ICALL                                         $40     
         74      > JMPZ_EX                                          ~41     $40, ->77
         75    >   ASSIGN                                           ~42     !5, 9223372036854775807
         76        BOOL                                             ~41     ~42
   16    77    >   ASSIGN_DIM                                               !7
         78        OP_DATA                                                  !5
    7    79        ASSIGN_DIM                                               !8
         80        OP_DATA                                                  !3
         81    >   INIT_FCALL_BY_NAME                                       'each'
         82        SEND_VAR_EX                                              !0
         83        DO_FCALL                                      0  $45     
         84        FETCH_LIST_R                                     $46     $45, 0
         85        ASSIGN                                                   !9, $46
         86        FETCH_LIST_R                                     $48     $45, 1
         87        ASSIGN                                                   !3, $48
         88      > JMPNZ                                                    $45, ->2
   18    89    >   INIT_FCALL                                               'array_multisort'
         90        SEND_REF                                                 !7
         91        SEND_REF                                                 !8
         92        DO_ICALL                                                 
   19    93        INIT_FCALL                                               'var_dump'
         94        SEND_VAR                                                 !8
         95        DO_ICALL                                                 
         96      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.2 ms | 1404 KiB | 32 Q