3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sentence = "One two three. Four five six. Seven eight nine. Ten eleven twelve. Thirteen fourteen fifteen."; for ($i = 1; $i <= 15; $i++) { if (preg_match('/^((\s*\S+){45}(\s*\S+)*?\.).*?\.\s*\S)/', $sentence, $match)) { echo "Summary {$i}: {$match[1]}\n"; } else { echo "Full text {$i}: {$sentence}\n"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 3
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 3
Branch analysis from position: 26
Branch analysis from position: 3
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 3
Branch analysis from position: 26
Branch analysis from position: 3
filename:       /in/8N6WP
function name:  (null)
number of ops:  27
compiled vars:  !0 = $sentence, !1 = $i, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'One+two+three.+Four+five+six.+Seven+eight+nine.+Ten+eleven+twelve.+Thirteen+fourteen+fifteen.'
    4     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->24
    5     3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5E%28%28%5Cs%2A%5CS%2B%29%7B45%7D%28%5Cs%2A%5CS%2B%29%2A%3F%5C.%29.%2A%3F%5C.%5Cs%2A%5CS%29%2F'
          5        SEND_VAR                                                 !0
          6        SEND_REF                                                 !2
          7        DO_ICALL                                         $5      
          8      > JMPZ                                                     $5, ->17
    6     9    >   ROPE_INIT                                     5  ~8      'Summary+'
         10        ROPE_ADD                                      1  ~8      ~8, !1
         11        ROPE_ADD                                      2  ~8      ~8, '%3A+'
         12        FETCH_DIM_R                                      ~6      !2, 1
         13        ROPE_ADD                                      3  ~8      ~8, ~6
         14        ROPE_END                                      4  ~7      ~8, '%0A'
         15        ECHO                                                     ~7
         16      > JMP                                                      ->23
    8    17    >   ROPE_INIT                                     5  ~12     'Full+text+'
         18        ROPE_ADD                                      1  ~12     ~12, !1
         19        ROPE_ADD                                      2  ~12     ~12, '%3A+'
         20        ROPE_ADD                                      3  ~12     ~12, !0
         21        ROPE_END                                      4  ~11     ~12, '%0A'
         22        ECHO                                                     ~11
    4    23    >   PRE_INC                                                  !1
         24    >   IS_SMALLER_OR_EQUAL                                      !1, 15
         25      > JMPNZ                                                    ~16, ->3
   10    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.95 ms | 1396 KiB | 15 Q