3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parrafo = "Santiago, 12 de febrero 2020.\r\nQuerida abuelita:\r\n <p> Cómo estás?\r\nYo muy bien.\r\nSaludos a todos. </p> \r\n Cariños, Carlos."; $segundo_parrafo = "Momento!\r\n <p> Se me olvidaba pedirte algo:\r\nenvíame dinero\r\n gracias!! </p> \r\n ahora sí, adiós"; $línea = preg_replace_callback( ' /<p>([\s|\S]*?)<\/p>/', function ($coincidencias) { return str_replace("\r\n", ' ', $coincidencias[0]); }, implode(PHP_EOL, [$parrafo, $segundo_parrafo]) ); echo $línea;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dtnar
function name:  (null)
number of ops:  17
compiled vars:  !0 = $parrafo, !1 = $segundo_parrafo, !2 = $línea
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Santiago%2C+12+de+febrero+2020.%0D%0AQuerida+abuelita%3A%0D%0A+%3Cp%3E+C%C3%B3mo+est%C3%A1s%3F%0D%0AYo+muy+bien.%0D%0ASaludos+a+todos.+%3C%2Fp%3E+%0D%0A+Cari%C3%B1os%2C+Carlos.'
    4     1        ASSIGN                                                   !1, 'Momento%21%0D%0A+%3Cp%3E+Se+me+olvidaba+pedirte+algo%3A%0D%0Aenv%C3%ADame+dinero%0D%0A+gracias%21%21+%3C%2Fp%3E+%0D%0A+ahora+s%C3%AD%2C+adi%C3%B3s'
    6     2        INIT_FCALL                                               'preg_replace_callback'
    7     3        SEND_VAL                                                 '+%2F%3Cp%3E%28%5B%5Cs%7C%5CS%5D%2A%3F%29%3C%5C%2Fp%3E%2F'
    8     4        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
   10     5        SEND_VAL                                                 ~5
   11     6        INIT_FCALL                                               'implode'
          7        SEND_VAL                                                 '%0A'
          8        INIT_ARRAY                                       ~6      !0
          9        ADD_ARRAY_ELEMENT                                ~6      !1
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
    6    13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !2, $8
   13    15        ECHO                                                     !2
   14    16      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dtnar
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $coincidencias
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%0D%0A'
          3        SEND_VAL                                                 '+'
          4        FETCH_DIM_R                                      ~1      !0, 0
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
   10     8*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
269.94 ms | 1005 KiB | 16 Q