3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "12345678900"; function fd($cpf){ $tamanhoCPF = strlen($cpf); if(!ctype_digit("$cpf") || $tamanhoCPF != 11){ die("O campo CPF Inválido"); } echo "CPF foi digitado corretamente </br>"; $arr = str_split($cpf, 3); printf('%s.%s.%s-%s', ...$arr); } fd($str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z2ttC
function name:  (null)
number of ops:  5
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '12345678900'
   19     1        INIT_FCALL                                                   'fd'
          2        SEND_VAR                                                     !0
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

Function fd:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/Z2ttC
function name:  fd
number of ops:  27
compiled vars:  !0 = $cpf, !1 = $tamanhoCPF, !2 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    7     1        STRLEN                                               ~3      !0
          2        ASSIGN                                                       !1, ~3
    9     3        INIT_FCALL                                                   'ctype_digit'
          4        CAST                                              6  ~5      !0
          5        SEND_VAL                                                     ~5
          6        DO_ICALL                                             $6      
          7        BOOL_NOT                                             ~7      $6
          8      > JMPNZ_EX                                             ~7      ~7, ->11
          9    >   IS_NOT_EQUAL                                         ~8      !1, 11
         10        BOOL                                                 ~7      ~8
         11    > > JMPZ                                                         ~7, ->15
   10    12    > > INIT_FCALL                                                   'exit'
         13*       SEND_VAL                                                     'O+campo+CPF+Inv%C3%A1lido'
         14*       DO_ICALL                                                     
   14    15    >   ECHO                                                         'CPF+foi+digitado+corretamente+%3C%2Fbr%3E'
   15    16        INIT_FCALL                                                   'str_split'
         17        SEND_VAR                                                     !0
         18        SEND_VAL                                                     3
         19        DO_ICALL                                             $10     
         20        ASSIGN                                                       !2, $10
   16    21        INIT_FCALL                                                   'printf'
         22        SEND_VAL                                                     '%25s.%25s.%25s-%25s'
         23        SEND_UNPACK                                                  !2
         24        CHECK_UNDEF_ARGS                                             
         25        DO_ICALL                                                     
   17    26      > RETURN                                                       null

End of function fd

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.11 ms | 2263 KiB | 18 Q