3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = <<<STR <p>{{ myFunction()&nbsp; }}</p> <p>&nbsp;</p> <p>{{ number|number_format(2, "&nbsp;.&nbsp;", '&nbsp;,&nbsp;')&nbsp;}}</p> <p>{% set myVariable = '&nbsp;&nbsp;' %}</p> STR; echo preg_replace('/&nbsp;(?=(?:(?!{[{%]).)*[%}]})/', ' ', $input);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H8BcT
function name:  (null)
number of ops:  8
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cp%3E%7B%7B+myFunction%28%29%26nbsp%3B+%7D%7D%3C%2Fp%3E++++%0A%3Cp%3E%26nbsp%3B%3C%2Fp%3E++++%0A%3Cp%3E%7B%7B+number%7Cnumber_format%282%2C+%22%26nbsp%3B.%26nbsp%3B%22%2C+%27%26nbsp%3B%2C%26nbsp%3B%27%29%26nbsp%3B%7D%7D%3C%2Fp%3E++++%0A%3Cp%3E%7B%25+set+myVariable+%3D+%27%26nbsp%3B%26nbsp%3B%27+%25%7D%3C%2Fp%3E'
   10     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%26nbsp%3B%28%3F%3D%28%3F%3A%28%3F%21%7B%5B%7B%25%5D%29.%29%2A%5B%25%7D%5D%7D%29%2F'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.7 ms | 1394 KiB | 15 Q