3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/"\K[\w-]+(\.jpg)(?=")/'; $str = ';s:27:"2018/08/hello-there-003.jpg";s:5:"sizes";a:23:{s:9:"thumbnail";a:4:{s:4:"file";s:27:"hello-there-003-150x150.jpg";s:5:"width";i:150;s:6:"height";i:150;s:9:"mime-type";s:10:"image/jpeg";}s:6:"medium";a:4:{s:4:"file";s:27:"hello-there-003-300x200.jpg" '; $subst = 'replacement$1'; $result = preg_replace($re, $subst, $str); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SR7UZ
function name:  (null)
number of ops:  11
compiled vars:  !0 = $re, !1 = $str, !2 = $subst, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%22%5CK%5B%5Cw-%5D%2B%28%5C.jpg%29%28%3F%3D%22%29%2F'
    4     1        ASSIGN                                                   !1, '%3Bs%3A27%3A%222018%2F08%2Fhello-there-003.jpg%22%3Bs%3A5%3A%22sizes%22%3Ba%3A23%3A%7Bs%3A9%3A%22thumbnail%22%3Ba%3A4%3A%7Bs%3A4%3A%22file%22%3Bs%3A27%3A%22hello-there-003-150x150.jpg%22%3Bs%3A5%3A%22width%22%3Bi%3A150%3Bs%3A6%3A%22height%22%3Bi%3A150%3Bs%3A9%3A%22mime-type%22%3Bs%3A10%3A%22image%2Fjpeg%22%3B%7Ds%3A6%3A%22medium%22%3Ba%3A4%3A%7Bs%3A4%3A%22file%22%3Bs%3A27%3A%22hello-there-003-300x200.jpg%22%0A'
    6     2        ASSIGN                                                   !2, 'replacement%241'
    8     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
   10     9        ECHO                                                     !3
   11    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
124.2 ms | 1009 KiB | 14 Q