3v4l.org

run code in 300+ PHP versions simultaneously
<?php function Syllables($string) { $syllables = array ( '(a|e|i|o|u|y)', ); return preg_match_all('/' . implode('|', $syllables) . '/', preg_replace('/[es]$/', '', $string)); } $domains = array ( 'algorithmical' => 0, 'bitoriented' => 0, 'cargocultdevs' => 0, 'corecursion' => 0, 'dereferenced' => 0, 'fellowhackers' => 0, 'gosub10' => 0, 'gosubten' => 0, 'humbledeveloper' => 0, 'humbleprogrammers' => 0, 'metaprogramming' => 0, 'privatevoid' => 0, 'shiftleft1' => 0, 'stackoverflow' => 0, 'understandrecursion' => 0, 'writeoncereadmany' => 0, ); foreach ($domains as $key => $value) { $domains[$key] = Syllables($value); } if (arsort($domains, SORT_NUMERIC) === true) { print_r($domains); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 10
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 10
filename:       /in/JcaXB
function name:  (null)
number of ops:  21
compiled vars:  !0 = $domains, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, <array>
   33     1      > FE_RESET_R                                       $4      !0, ->10
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->10
          3    >   ASSIGN                                                   !2, ~5
   35     4        INIT_FCALL                                               'syllables'
          5        SEND_VAR                                                 !1
          6        DO_FCALL                                      0  $8      
          7        ASSIGN_DIM                                               !0, !2
          8        OP_DATA                                                  $8
   33     9      > JMP                                                      ->2
         10    >   FE_FREE                                                  $4
   38    11        INIT_FCALL                                               'arsort'
         12        SEND_REF                                                 !0
         13        SEND_VAL                                                 1
         14        DO_ICALL                                         $9      
         15        TYPE_CHECK                                    8          $9
         16      > JMPZ                                                     ~10, ->20
   40    17    >   INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
   41    20    > > RETURN                                                   1

Function syllables:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JcaXB
function name:  Syllables
number of ops:  19
compiled vars:  !0 = $string, !1 = $syllables
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
   10     2        INIT_FCALL                                               'preg_match_all'
          3        INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 '%7C'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $3      
          7        CONCAT                                           ~4      '%2F', $3
          8        CONCAT                                           ~5      ~4, '%2F'
          9        SEND_VAL                                                 ~5
         10        INIT_FCALL                                               'preg_replace'
         11        SEND_VAL                                                 '%2F%5Bes%5D%24%2F'
         12        SEND_VAL                                                 ''
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                         $7      
         17      > RETURN                                                   $7
   11    18*     > RETURN                                                   null

End of function syllables

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.41 ms | 1403 KiB | 24 Q