3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'What will happen to the #globe if there is more #sunlight more #moonlight but less overall #light. Ah! Funny little #joke. Goodbye fellas!!! #Morning Jokes #For No one.'; $GLOBALS['_loops'] = 0; echo "BEFORE : ", $message, "\n"; echo "AFTER : ", preg_replace_callback('~\h*#[a-z]+\h*~i', function($match) { return ' '; }, $message), "\n"; echo "LOOPS : ", $GLOBALS['_loops'], "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XfRJX
function name:  (null)
number of ops:  22
compiled vars:  !0 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'What+will+happen+to+the+%23globe+if+there+is+more+%23sunlight+more+%23moonlight+but+less+overall+%23light.+Ah%21+Funny+little+%23joke.+Goodbye+fellas%21%21%21+%23Morning+Jokes+%23For+No+one.'
    4     1        FETCH_W                      global              $2      'GLOBALS'
          2        ASSIGN_DIM                                               $2, '_loops'
          3        OP_DATA                                                  0
    5     4        ECHO                                                     'BEFORE+%3A+'
          5        ECHO                                                     !0
          6        ECHO                                                     '%0A'
    6     7        ECHO                                                     'AFTER++%3A+'
          8        INIT_FCALL                                               'preg_replace_callback'
          9        SEND_VAL                                                 '%7E%5Ch%2A%23%5Ba-z%5D%2B%5Ch%2A%7Ei'
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FXfRJX%3A6%240'
         11        SEND_VAL                                                 ~4
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        ECHO                                                     $5
         15        ECHO                                                     '%0A'
    7    16        ECHO                                                     'LOOPS++%3A+'
         17        FETCH_R                      global              ~6      'GLOBALS'
         18        FETCH_DIM_R                                      ~7      ~6, '_loops'
         19        ECHO                                                     ~7
         20        ECHO                                                     '%0A'
         21      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.3 ms | 1396 KiB | 15 Q