3v4l.org

run code in 300+ PHP versions simultaneously
<?php $msg = "1a12v21s1fsd4"; $txt = "/(1[a-z]+1)/"; $res = preg_replace_callback($txt,function($m){ print_r($m); //return $m; },$msg); echo $res;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T0nXC
function name:  (null)
number of ops:  11
compiled vars:  !0 = $msg, !1 = $txt, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '1a12v21s1fsd4'
    3     1        ASSIGN                                                   !1, '%2F%281%5Ba-z%5D%2B1%29%2F'
    4     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAR                                                 !1
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FT0nXC%3A4%240'
    7     5        SEND_VAL                                                 ~5
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
    4     8        ASSIGN                                                   !2, $6
    8     9        ECHO                                                     !2
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FT0nXC%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T0nXC
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    7     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FT0nXC%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.92 ms | 1395 KiB | 17 Q