3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = '12.345678,23.45678901'; preg_match('/^(\d+\.\d{3})\d*,(\d+\.\d{2})\d*$/', $str, $matches); echo "first number: {$matches[1]}\nsecond number: {$matches[2]}\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n9s5O
function name:  (null)
number of ops:  15
compiled vars:  !0 = $str, !1 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '12.345678%2C23.45678901'
    3     1        INIT_FCALL                                                   'preg_match'
          2        SEND_VAL                                                     '%2F%5E%28%5Cd%2B%5C.%5Cd%7B3%7D%29%5Cd%2A%2C%28%5Cd%2B%5C.%5Cd%7B2%7D%29%5Cd%2A%24%2F'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                                     
    4     6        ROPE_INIT                                         5  ~7      'first+number%3A+'
          7        FETCH_DIM_R                                          ~4      !1, 1
          8        ROPE_ADD                                          1  ~7      ~7, ~4
          9        ROPE_ADD                                          2  ~7      ~7, '%0Asecond+number%3A+'
         10        FETCH_DIM_R                                          ~5      !1, 2
         11        ROPE_ADD                                          3  ~7      ~7, ~5
         12        ROPE_END                                          4  ~6      ~7, '%0A'
         13        ECHO                                                         ~6
         14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.3 ms | 2175 KiB | 14 Q