3v4l.org

run code in 300+ PHP versions simultaneously
<?php function koapToNum($koap){ $o = array('@[^\d\.]@','\.\.'); $n = array('','.'); $digit = preg_replace($o, $n, $koap); return $digit; } echo koapToNum('12.21.1 ч.1.1');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JCrDD
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'koaptonum'
          1        SEND_VAL                                                 '12.21.1+%D1%87.1.1'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function koaptonum:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JCrDD
function name:  koapToNum
number of ops:  11
compiled vars:  !0 = $koap, !1 = $o, !2 = $n, !3 = $digit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    5     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !3, $6
    6     9      > RETURN                                                   !3
    7    10*     > RETURN                                                   null

End of function koaptonum

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.78 ms | 942 KiB | 17 Q