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) { 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); echo $font;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D8tXI
function name:  (null)
number of ops:  11
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%2FD8tXI%3A6%240'
    9     5        SEND_VAL                                                 ~5
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
    6     8        ASSIGN                                                   !2, $6
   11     9        ECHO                                                     !2
         10      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.46 ms | 1395 KiB | 15 Q