3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "12345678900"; function fr($cpf){ $regex = '#^\d{11}$#'; if(!preg_match($regex, $cpf)){ die("O campo CPF Inválido"); } echo "CPF foi digitado corretamente </br>"; $arr = str_split($cpf, 3); printf('%s.%s.%s-%s', ...$arr); } fr($str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kRgMp
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'
   21     1        INIT_FCALL                                                   'fr'
          2        SEND_VAR                                                     !0
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

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

End of function fr

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
203.73 ms | 2179 KiB | 20 Q