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($the_string, "", $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/anIVl
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'isstringonlyaz'
          1        SEND_VAL                                                 'St+mary%27s'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   15     4      > RETURN                                                   1

Function isstringonlyaz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/anIVl
function name:  isStringOnlyAZ
number of ops:  12
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                                                 !0
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    8     8        STRLEN                                           ~5      !0
          9        IS_EQUAL                                         ~6      ~5, 0
         10      > RETURN                                                   ~6
    9    11*     > RETURN                                                   null

End of function isstringonlyaz

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.42 ms | 1402 KiB | 16 Q