3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "https://www.instagram.com/p/BxKRx5CHn5i/", "https://www.instagram.com/p/BrODg5XHlE6/?utm_source=ig_share_sheet&igshid=znsinsart176", "https://www.instagram.com/p/BxKRx5CHn5i/", "https://www.instagram.com/username/p/BxE5PpZhoa9/", "https://www.instagram.com/username/p/BxE5PpZhoa9/#look=overhere" ]; foreach ($strings as $string) { $pos = strpos($string, '/p/'); if ($pos === false) { continue; } echo substr($string, $pos + 3, 11); echo " (from $string)\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 23
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/aoAbf
function name:  (null)
number of ops:  25
compiled vars:  !0 = $strings, !1 = $string, !2 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   10     1      > FE_RESET_R                                       $4      !0, ->23
          2    > > FE_FETCH_R                                               $4, !1, ->23
   11     3    >   INIT_FCALL                                               'strpos'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 '%2Fp%2F'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
   12     8        TYPE_CHECK                                    4          !2
          9      > JMPZ                                                     ~7, ->11
   13    10    > > JMP                                                      ->2
   15    11    >   INIT_FCALL                                               'substr'
         12        SEND_VAR                                                 !1
         13        ADD                                              ~8      !2, 3
         14        SEND_VAL                                                 ~8
         15        SEND_VAL                                                 11
         16        DO_ICALL                                         $9      
         17        ECHO                                                     $9
   16    18        ROPE_INIT                                     3  ~11     '+%28from+'
         19        ROPE_ADD                                      1  ~11     ~11, !1
         20        ROPE_END                                      2  ~10     ~11, '%29%0A'
         21        ECHO                                                     ~10
   10    22      > JMP                                                      ->2
         23    >   FE_FREE                                                  $4
   17    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
226.32 ms | 1011 KiB | 15 Q