3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<EOF (50.54309395492101, 8.515777587890625)(50.59194113547687, 8.647613525390625)(50.66250551544689, 8.765716552734375)(50.699922592840785, 8.842620849609375)(50.645962883774004, 8.795928955078125)(50.63289879592736, 8.7615966796875)(50.609374285799454, 8.71490478515625)(50.57798996541261, 8.680572509765625)(50.5605451899225, 8.64898681640625)(50.53785732470035, 8.56109619140625)(50.5291283155526, 8.513031005859375)(50.5291283155526, 8.513031005859375) EOF; $count = preg_match_all('/(\d+\.\d+)/', $str, $matches); if ($count === false || ($count % 2 != 0)) { // error } else { $pairs = array(); for ($i = 0; $i < $count; $i+=2) { $pairs[] = array($matches[0][$i], $matches[0][$i+1]); } echo count($pairs); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 17
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 17
Branch analysis from position: 29
Branch analysis from position: 17
Branch analysis from position: 12
filename:       /in/X1ehQ
function name:  (null)
number of ops:  32
compiled vars:  !0 = $str, !1 = $count, !2 = $matches, !3 = $pairs, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2850.54309395492101%2C+8.515777587890625%29%2850.59194113547687%2C+8.647613525390625%29%2850.66250551544689%2C+8.765716552734375%29%2850.699922592840785%2C+8.842620849609375%29%2850.645962883774004%2C+8.795928955078125%29%2850.63289879592736%2C+8.7615966796875%29%2850.609374285799454%2C+8.71490478515625%29%2850.57798996541261%2C+8.680572509765625%29%2850.5605451899225%2C+8.64898681640625%29%2850.53785732470035%2C+8.56109619140625%29%2850.5291283155526%2C+8.513031005859375%29%2850.5291283155526%2C+8.513031005859375%29'
    7     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28%5Cd%2B%5C.%5Cd%2B%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !2
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
    9     7        TYPE_CHECK                                    4  ~8      !1
          8      > JMPNZ_EX                                         ~8      ~8, ->12
          9    >   MOD                                              ~9      !1, 2
         10        IS_NOT_EQUAL                                     ~10     ~9, 0
         11        BOOL                                             ~8      ~10
         12    > > JMPZ                                                     ~8, ->14
         13    > > JMP                                                      ->31
   13    14    >   ASSIGN                                                   !3, <array>
   15    15        ASSIGN                                                   !4, 0
         16      > JMP                                                      ->27
   16    17    >   FETCH_DIM_R                                      ~14     !2, 0
         18        FETCH_DIM_R                                      ~15     ~14, !4
         19        INIT_ARRAY                                       ~16     ~15
         20        ADD                                              ~18     !4, 1
         21        FETCH_DIM_R                                      ~17     !2, 0
         22        FETCH_DIM_R                                      ~19     ~17, ~18
         23        ADD_ARRAY_ELEMENT                                ~16     ~19
         24        ASSIGN_DIM                                               !3
         25        OP_DATA                                                  ~16
   15    26        ASSIGN_OP                                     1          !4, 2
         27    >   IS_SMALLER                                               !4, !1
         28      > JMPNZ                                                    ~21, ->17
   19    29    >   COUNT                                            ~22     !3
         30        ECHO                                                     ~22
   20    31    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.83 ms | 1400 KiB | 15 Q