3v4l.org

run code in 500+ PHP versions simultaneously
<?php $texthtml = '<p>test</p><br><p><img src="1.jpeg" alt=""><br></p><p><img src="2.png" alt=""><br><img src="3.png" alt=""></p>'; $search = 'img src="'; $pos = strpos($texthtml, $search)+ strlen($search); $lenght= strpos($texthtml, '"', $pos)-$pos; echo substr($texthtml, $pos, $lenght);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/48iiI
function name:  (null)
number of ops:  14
compiled vars:  !0 = $texthtml, !1 = $search, !2 = $pos, !3 = $lenght
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%3Cp%3Etest%3C%2Fp%3E%3Cbr%3E%3Cp%3E%3Cimg+src%3D%221.jpeg%22+alt%3D%22%22%3E%3Cbr%3E%3C%2Fp%3E%3Cp%3E%3Cimg+src%3D%222.png%22+alt%3D%22%22%3E%3Cbr%3E%3Cimg+src%3D%223.png%22+alt%3D%22%22%3E%3C%2Fp%3E'
    4     1        ASSIGN                                                       !1, 'img+src%3D%22'
    5     2        FRAMELESS_ICALL_2                strpos              ~6      !0, !1
          3        STRLEN                                               ~7      !1
          4        ADD                                                  ~8      ~6, ~7
          5        ASSIGN                                                       !2, ~8
    6     6        FRAMELESS_ICALL_3                strpos              ~10     !0, '%22'
          7        OP_DATA                                                      !2
          8        SUB                                                  ~11     ~10, !2
          9        ASSIGN                                                       !3, ~11
    8    10        FRAMELESS_ICALL_3                substr              ~13     !0, !2
         11        OP_DATA                                                      !3
         12        ECHO                                                         ~13
         13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.41 ms | 2581 KiB | 13 Q