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(;$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 = 86, Position 2 = 2
Branch analysis from position: 86
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 = 86, Position 2 = 2
Branch analysis from position: 86
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/YWIl7
function name:  (null)
number of ops:  94
compiled vars:  !0 = $in, !1 = $l, !2 = $i, !3 = $w, !4 = $c, !5 = $v, !6 = $m, !7 = $t, !8 = $S
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                                         $10     
          5        ASSIGN                                           ~11     !2, $10
          6        ASSIGN                                                   !1, ~11
          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                                         $13     
         16        SEND_VAR                                                 $13
         17        DO_ICALL                                         $14     
         18        SEND_VAR                                                 $14
         19        DO_ICALL                                         $15     
         20        ASSIGN                                                   !4, $15
   10    21        IS_SMALLER                                       ~17     96, !4
         22      > JMPZ_EX                                          ~17     ~17, ->25
         23    >   IS_SMALLER                                       ~18     !4, 123
         24        BOOL                                             ~17     ~18
         25    > > JMPZ_EX                                          ~17     ~17, ->29
         26    >   SUB                                              ~19     !4, 96
         27        ASSIGN_OP                                     1  ~20     !5, ~19
         28        BOOL                                             ~17     ~20
         29    > > JMPNZ_EX                                         ~17     ~17, ->40
         30    >   IS_SMALLER                                       ~21     64, !4
         31      > JMPZ_EX                                          ~21     ~21, ->34
         32    >   IS_SMALLER                                       ~22     !4, 91
         33        BOOL                                             ~21     ~22
         34    > > JMPZ_EX                                          ~21     ~21, ->39
         35    >   MUL                                              ~23     !4, 1.5
         36        SUB                                              ~24     ~23, 96
         37        ASSIGN_OP                                     1  ~25     !5, ~24
         38        BOOL                                             ~21     ~25
         39    >   BOOL                                             ~17     ~21
         40    > > JMPNZ_EX                                         ~17     ~17, ->55
         41    >   IS_SMALLER                                       ~26     48, !4
         42      > JMPZ_EX                                          ~26     ~26, ->45
         43    >   IS_SMALLER                                       ~27     32, !4
         44        BOOL                                             ~26     ~27
         45    > > JMPNZ_EX                                         ~26     ~26, ->51
         46    >   IS_SMALLER                                       ~28     57, !4
         47      > JMPZ_EX                                          ~28     ~28, ->50
         48    >   IS_SMALLER                                       ~29     !4, 127
         49        BOOL                                             ~28     ~29
         50    >   BOOL                                             ~26     ~28
         51    > > JMPZ_EX                                          ~26     ~26, ->54
         52    >   ASSIGN_OP                                     2  ~30     !5, 1
         53        BOOL                                             ~26     ~30
         54    >   BOOL                                             ~17     ~26
    8    55    >   POST_DEC                                         ~31     !2
         56      > JMPNZ                                                    ~31, ->8
   12    57    >   FETCH_CONSTANT                                   ~32     'l'
         58        DIV                                              ~33     !5, ~32
         59        ASSIGN                                                   !5, ~33
   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                                      ~36     !6, 0
         67        SEND_VAL                                                 ~36
         68        DO_ICALL                                         $37     
         69        ASSIGN_OP                                     2          !5, $37
   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                                         $39     
         74      > JMPZ_EX                                          ~40     $39, ->77
         75    >   ASSIGN                                           ~41     !5, 9223372036854775807
         76        BOOL                                             ~40     ~41
   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  $44     
         84        ASSIGN                                           ~45     !3, $44
         85      > JMPNZ                                                    ~45, ->2
   18    86    >   INIT_FCALL                                               'array_multisort'
         87        SEND_REF                                                 !7
         88        SEND_REF                                                 !8
         89        DO_ICALL                                                 
   19    90        INIT_FCALL                                               'var_dump'
         91        SEND_VAR                                                 !8
         92        DO_ICALL                                                 
         93      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.26 ms | 1404 KiB | 29 Q