3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isStringOnlyAZ($the_string) { $valid_chars = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); $the_string = str_replace($valid_chars, "", $the_string); echo $the_string; return (strlen($the_string)==0); } echo isStringOnlyAZ("St mary's"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E5PAp
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'isstringonlyaz'
          1        SEND_VAL                                                 'St+mary%27s'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   16     4      > RETURN                                                   1

Function isstringonlyaz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E5PAp
function name:  isStringOnlyAZ
number of ops:  13
compiled vars:  !0 = $the_string, !1 = $valid_chars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
    7     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    8     8        ECHO                                                     !0
    9     9        STRLEN                                           ~5      !0
         10        IS_EQUAL                                         ~6      ~5, 0
         11      > RETURN                                                   ~6
   10    12*     > RETURN                                                   null

End of function isstringonlyaz

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.04 ms | 1402 KiB | 16 Q