3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_content = '<a href="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xpa1/v/t1.0-9/p100x100/10394047_10202106066684824_80590983553430220_n.jpg?oh=fcccf17086a3593d926a100c9a82f898&amp;oe=546AACC9&amp;__gda__=1416199983_da92aa7319b2636ad2887652e2f9a10e">https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xpa1/v/t1.0-9/p100x100/10394047_10202106066684824_80590983553430220_n.jpg?oh=fcccf17086a3593d926a100c9a82f898&amp;oe=546AACC9&amp;__gda__=1416199983_da92aa7319b2636ad2887652e2f9a10e</a>'; $_fbcdn_imagelink_pattern = '#<a href=\"https://fbcdn([^\?\'"]*?)(.jpg|.gif|.png)\?([^\'"]*?)[^>]*>([^<]*?)</a>#i'; function fbcdn_link2img( $matches ) { $ret = ""; if(!empty($matches)) { $ret = "<img src=\"".urldecode(end($matches))."\">"; } return $ret; } $_content = preg_replace_callback($_fbcdn_imagelink_pattern, "fbcdn_link2img", $_content); echo $_content;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fCiaI
function name:  (null)
number of ops:  10
compiled vars:  !0 = $_content, !1 = $_fbcdn_imagelink_pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Ca+href%3D%22https%3A%2F%2Ffbcdn-sphotos-g-a.akamaihd.net%2Fhphotos-ak-xpa1%2Fv%2Ft1.0-9%2Fp100x100%2F10394047_10202106066684824_80590983553430220_n.jpg%3Foh%3Dfcccf17086a3593d926a100c9a82f898%26amp%3Boe%3D546AACC9%26amp%3B__gda__%3D1416199983_da92aa7319b2636ad2887652e2f9a10e%22%3Ehttps%3A%2F%2Ffbcdn-sphotos-g-a.akamaihd.net%2Fhphotos-ak-xpa1%2Fv%2Ft1.0-9%2Fp100x100%2F10394047_10202106066684824_80590983553430220_n.jpg%3Foh%3Dfcccf17086a3593d926a100c9a82f898%26amp%3Boe%3D546AACC9%26amp%3B__gda__%3D1416199983_da92aa7319b2636ad2887652e2f9a10e%3C%2Fa%3E'
    3     1        ASSIGN                                                   !1, '%23%3Ca+href%3D%5C%22https%3A%2F%2Ffbcdn%28%5B%5E%5C%3F%27%22%5D%2A%3F%29%28.jpg%7C.gif%7C.png%29%5C%3F%28%5B%5E%27%22%5D%2A%3F%29%5B%5E%3E%5D%2A%3E%28%5B%5E%3C%5D%2A%3F%29%3C%2Fa%3E%23i'
   11     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 'fbcdn_link2img'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
   12     8        ECHO                                                     !0
          9      > RETURN                                                   1

Function fbcdn_link2img:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/fCiaI
function name:  fbcdn_link2img
number of ops:  16
compiled vars:  !0 = $matches, !1 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, ''
    6     2        ISSET_ISEMPTY_CV                                 ~3      !0
          3        BOOL_NOT                                         ~4      ~3
          4      > JMPZ                                                     ~4, ->14
    7     5    >   INIT_FCALL                                               'urldecode'
          6        INIT_FCALL                                               'end'
          7        SEND_REF                                                 !0
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                         $6      
         11        CONCAT                                           ~7      '%3Cimg+src%3D%22', $6
         12        CONCAT                                           ~8      ~7, '%22%3E'
         13        ASSIGN                                                   !1, ~8
    9    14    > > RETURN                                                   !1
   10    15*     > RETURN                                                   null

End of function fbcdn_link2img

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.69 ms | 1396 KiB | 19 Q