3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cpf = 12345678912; if(is_numeric($cpf) && strlen($cpf) == 11) { $block1 = substr($cpf, 0, 3); $block2 = substr($cpf, 3, 3); $block3 = substr($cpf, 6, 3); $block4 = substr($cpf, 9); echo "$block1.$block2.$block3-$block4"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 40
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 8
filename:       /in/19XOo
function name:  (null)
number of ops:  41
compiled vars:  !0 = $cpf, !1 = $block1, !2 = $block2, !3 = $block3, !4 = $block4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 12345678912
    4     1        INIT_FCALL                                               'is_numeric'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4      > JMPZ_EX                                          ~7      $6, ->8
          5    >   STRLEN                                           ~8      !0
          6        IS_EQUAL                                         ~9      ~8, 11
          7        BOOL                                             ~7      ~9
          8    > > JMPZ                                                     ~7, ->40
    5     9    >   INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 0
         12        SEND_VAL                                                 3
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !1, $10
    6    15        INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 3
         18        SEND_VAL                                                 3
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !2, $12
    7    21        INIT_FCALL                                               'substr'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 6
         24        SEND_VAL                                                 3
         25        DO_ICALL                                         $14     
         26        ASSIGN                                                   !3, $14
    8    27        INIT_FCALL                                               'substr'
         28        SEND_VAR                                                 !0
         29        SEND_VAL                                                 9
         30        DO_ICALL                                         $16     
         31        ASSIGN                                                   !4, $16
    9    32        ROPE_INIT                                     7  ~19     !1
         33        ROPE_ADD                                      1  ~19     ~19, '.'
         34        ROPE_ADD                                      2  ~19     ~19, !2
         35        ROPE_ADD                                      3  ~19     ~19, '.'
         36        ROPE_ADD                                      4  ~19     ~19, !3
         37        ROPE_ADD                                      5  ~19     ~19, '-'
         38        ROPE_END                                      6  ~18     ~19, !4
         39        ECHO                                                     ~18
   10    40    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.46 ms | 1396 KiB | 17 Q