3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fam = "Перегудов"; $s = array("/^./", "/./"); $r = array("", "*"); $f = substr($fam, 0, 1); $fam = preg_replace($s, $r, $fam); //$fam = preg_replace("@^.@e", "", $fam); //$fam = preg_replace("@.@e", "-", $fam); echo $f.$fam; //echo preg_replace($s, $r, $fam);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D9qE2
function name:  (null)
number of ops:  18
compiled vars:  !0 = $fam, !1 = $s, !2 = $r, !3 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%D0%9F%D0%B5%D1%80%D0%B5%D0%B3%D1%83%D0%B4%D0%BE%D0%B2'
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    5     3        INIT_FCALL                                               'substr'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    6     9        INIT_FCALL                                               'preg_replace'
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !2
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !0, $9
    9    15        CONCAT                                           ~11     !3, !0
         16        ECHO                                                     ~11
   10    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.85 ms | 1394 KiB | 17 Q