3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '<p>Bevorder de doorbloeding van je benen door:</p><ul><li>dagelijks voldoende lichaamsbeweging;</li><li>niet te roken;</li><li>bij zittend <a href="http://www.google.com">werk</a> regelmatig een kleine looppauze in te lassen of onder je bureau kleine oefeningen te doen met je benen;</li><li>bij staand werk je gewicht over beide voeten te verdelen en zo veel mogelijk kleine bewegingen te maken;</li><li>je benen te masseren: altijd van beneden naar boven, dus richting je hart.<br /></li></ul>'; $characters = array('<br>', '<li>', '</li>'); // Replace all the list items and breaks by new lines. $replaced_text = str_replace($characters, "\n", strip_tags($text, '<p><br><li>')); // Replace all the opening p tags by emtpy texts. $replaced_text = str_replace('<p>', '', $replaced_text); // Replace all the closing p tage by new lines. $replaced_text = str_replace('</p>', "\n\n", $replaced_text); // Check for any trailing white space. $replaced_text = rtrim($replaced_text); var_dump($replaced_text);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nsqIL
function name:  (null)
number of ops:  32
compiled vars:  !0 = $text, !1 = $characters, !2 = $replaced_text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cp%3EBevorder+de+doorbloeding+van+je+benen+door%3A%3C%2Fp%3E%3Cul%3E%3Cli%3Edagelijks+voldoende+lichaamsbeweging%3B%3C%2Fli%3E%3Cli%3Eniet+te+roken%3B%3C%2Fli%3E%3Cli%3Ebij+zittend+%3Ca+href%3D%22http%3A%2F%2Fwww.google.com%22%3Ewerk%3C%2Fa%3E+regelmatig+een+kleine+looppauze+in+te+lassen+of+onder+je+bureau+kleine+oefeningen+te+doen+met+je+benen%3B%3C%2Fli%3E%3Cli%3Ebij+staand+werk+je+gewicht+over+beide+voeten+te+verdelen+en+zo+veel+mogelijk+kleine+bewegingen+te+maken%3B%3C%2Fli%3E%3Cli%3Eje+benen+te+masseren%3A+altijd+van+beneden+naar+boven%2C+dus+richting+je+hart.%3Cbr+%2F%3E%3C%2Fli%3E%3C%2Ful%3E'
    3     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 '%0A'
          5        INIT_FCALL                                               'strip_tags'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '%3Cp%3E%3Cbr%3E%3Cli%3E'
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                         $6      
         11        ASSIGN                                                   !2, $6
    7    12        INIT_FCALL                                               'str_replace'
         13        SEND_VAL                                                 '%3Cp%3E'
         14        SEND_VAL                                                 ''
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $8      
         17        ASSIGN                                                   !2, $8
    9    18        INIT_FCALL                                               'str_replace'
         19        SEND_VAL                                                 '%3C%2Fp%3E'
         20        SEND_VAL                                                 '%0A%0A'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $10     
         23        ASSIGN                                                   !2, $10
   11    24        INIT_FCALL                                               'rtrim'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                         $12     
         27        ASSIGN                                                   !2, $12
   12    28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.69 ms | 1396 KiB | 21 Q