3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sentence = strtolower('Jumpy Qbert grawlix'); $usage = count_chars($sentence, 3); $alphabet = range('a', 'z'); var_export([ 'Sentence' => $sentence, 'Total Length' => strlen($sentence), 'Alphabetical Length' => preg_match_all('~[a-z]~', $sentence, $letters), 'Unused Letters' => array_diff($alphabet, $letters[0]), 'Duplicated Letters' => array_diff(array_count_values($letters[0]), [1]), ]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X4kTQ
function name:  (null)
number of ops:  42
compiled vars:  !0 = $sentence, !1 = $usage, !2 = $alphabet, !3 = $letters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtolower'
          1        SEND_VAL                                                 'Jumpy+Qbert+grawlix'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    4     4        INIT_FCALL                                               'count_chars'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 3
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !1, $6
    5     9        INIT_FCALL                                               'range'
         10        SEND_VAL                                                 'a'
         11        SEND_VAL                                                 'z'
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !2, $8
    6    14        INIT_FCALL                                               'var_export'
    7    15        INIT_ARRAY                                       ~10     !0, 'Sentence'
    8    16        STRLEN                                           ~11     !0
         17        ADD_ARRAY_ELEMENT                                ~10     ~11, 'Total+Length'
    9    18        INIT_FCALL                                               'preg_match_all'
         19        SEND_VAL                                                 '%7E%5Ba-z%5D%7E'
         20        SEND_VAR                                                 !0
         21        SEND_REF                                                 !3
         22        DO_ICALL                                         $12     
         23        ADD_ARRAY_ELEMENT                                ~10     $12, 'Alphabetical+Length'
   10    24        INIT_FCALL                                               'array_diff'
         25        SEND_VAR                                                 !2
         26        FETCH_DIM_R                                      ~13     !3, 0
         27        SEND_VAL                                                 ~13
         28        DO_ICALL                                         $14     
         29        ADD_ARRAY_ELEMENT                                ~10     $14, 'Unused+Letters'
   11    30        INIT_FCALL                                               'array_diff'
         31        INIT_FCALL                                               'array_count_values'
         32        FETCH_DIM_R                                      ~15     !3, 0
         33        SEND_VAL                                                 ~15
         34        DO_ICALL                                         $16     
         35        SEND_VAR                                                 $16
         36        SEND_VAL                                                 <array>
         37        DO_ICALL                                         $17     
         38        ADD_ARRAY_ELEMENT                                ~10     $17, 'Duplicated+Letters'
         39        SEND_VAL                                                 ~10
         40        DO_ICALL                                                 
   12    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
209.53 ms | 1396 KiB | 27 Q