3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '<p align="center"><font face="Proxima Nova Alt Th" size="21" color="#ffffff" letterSpacing="-1.000000" kerning="1"><b>YOUR</b></font></p><p align="center"><font face="Proxima Nova Alt Th" size="21" color="#ffffff" letterSpacing="-1.000000" kerning="1"><b>OFFER</b></font></p>'; $regex = "/font face=\"([a-z 0-9]+)\"/i"; $font = preg_replace_callback($regex, function($matches) { var_dump($matches); die;; return $matches[1]; // I WANT TO GET THE FONT HERE, INSTEAD, ON VAR_DUMP, I GET FORMATTED TEXT (I literally only want the text) }, $string); var_dump($font);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AFRgD
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string, !1 = $regex, !2 = $font
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cp+align%3D%22center%22%3E%3Cfont+face%3D%22Proxima+Nova+Alt+Th%22+size%3D%2221%22+color%3D%22%23ffffff%22+letterSpacing%3D%22-1.000000%22+kerning%3D%221%22%3E%3Cb%3EYOUR%3C%2Fb%3E%3C%2Ffont%3E%3C%2Fp%3E%3Cp+align%3D%22center%22%3E%3Cfont+face%3D%22Proxima+Nova+Alt+Th%22+size%3D%2221%22+color%3D%22%23ffffff%22+letterSpacing%3D%22-1.000000%22+kerning%3D%221%22%3E%3Cb%3EOFFER%3C%2Fb%3E%3C%2Ffont%3E%3C%2Fp%3E'
    4     1        ASSIGN                                                   !1, '%2Ffont+face%3D%22%28%5Ba-z+0-9%5D%2B%29%22%2Fi'
    6     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAR                                                 !1
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FAFRgD%3A6%240'
    9     5        SEND_VAL                                                 ~5
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
    6     8        ASSIGN                                                   !2, $6
   11     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FAFRgD%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/AFRgD
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
          4      > EXIT                                                     
    8     5*       FETCH_DIM_R                                      ~2      !0, 1
          6*       RETURN                                                   ~2
    9     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FAFRgD%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.76 ms | 1396 KiB | 17 Q