3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Hello, http://jsfiddle.net/uyuouyvz/ this is a test for jsfiddle.net"; $preg = "%(http://(www.)?[jsfiddle].net/\w+?(/\d+)?(/.*)?)%im"; $text = preg_replace_callback($preg, function($match) { return "<iframe src=\"{$match[0]}\"></iframe>"; }); echo $text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3MdVa
function name:  (null)
number of ops:  10
compiled vars:  !0 = $text, !1 = $preg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hello%2C+http%3A%2F%2Fjsfiddle.net%2Fuyuouyvz%2F+this+is+a+test+for+jsfiddle.net'
    4     1        ASSIGN                                                   !1, '%25%28http%3A%2F%2F%28www.%29%3F%5Bjsfiddle%5D.net%2F%5Cw%2B%3F%28%2F%5Cd%2B%29%3F%28%2F.%2A%29%3F%29%25im'
    5     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAR                                                 !1
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F3MdVa%3A5%240'
    7     5        SEND_VAL                                                 ~4
          6        DO_ICALL                                         $5      
    5     7        ASSIGN                                                   !0, $5
    8     8        ECHO                                                     !0
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F3MdVa%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3MdVa
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ROPE_INIT                                     3  ~3      '%3Ciframe+src%3D%22'
          2        FETCH_DIM_R                                      ~1      !0, 0
          3        ROPE_ADD                                      1  ~3      ~3, ~1
          4        ROPE_END                                      2  ~2      ~3, '%22%3E%3C%2Fiframe%3E'
          5      > RETURN                                                   ~2
    7     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F3MdVa%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.53 ms | 1395 KiB | 15 Q