3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "{ccm:export:page:test} is a {ccm:export:page:test}"; var_dump(preg_replace_callback('/\{ccm:export:page:(.+?)\}/i', function(){ return 'test'; }, $string));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s9IZl
function name:  (null)
number of ops:  11
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7Bccm%3Aexport%3Apage%3Atest%7D+is+a+%7Bccm%3Aexport%3Apage%3Atest%7D'
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAL                                                 '%2F%5C%7Bccm%3Aexport%3Apage%3A%28.%2B%3F%29%5C%7D%2Fi'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fs9IZl%3A5%240'
          5        SEND_VAL                                                 ~2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fs9IZl%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s9IZl
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E > > RETURN                                                   'test'
          1*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.5 ms | 1395 KiB | 17 Q