3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'Featuring six amazing National Parks: Glacier, Waterton Lakes, Yellowstone, Grand Teton, Arches, and Canyonlands. Your tour begins in Chicago where you will board the Empire Builder bound for the first National Park on your trip, Glacier, where you will explore the famed Going-to-the-Sun Road and enjoy a full-day excursion to Waterton Lakes National Park in Canada (passport required).'; $nl = "(?:\n|\r\n|\r)"; echo preg_replace( '/(?<!' . $nl . ')' . $nl . '(?!' . $nl . ')/', '', $text);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kJL6T
function name:  (null)
number of ops:  15
compiled vars:  !0 = $text, !1 = $nl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Featuring+six+amazing+National+Parks%3A+Glacier%2C%0AWaterton+Lakes%2C+Yellowstone%2C+Grand+Teton%2C+Arches%2C+and+Canyonlands.%0A%0AYour+tour+begins+in+Chicago+where+you+will+board%0Athe+Empire+Builder%0Abound+for+the+first+National+Park+on+your+trip%2C+Glacier%2C+where+you+will+explore+the+famed+Going-to-the-Sun+Road+and+enjoy+a+full-day+excursion+to%0AWaterton+Lakes+National+Park+in+Canada+%28passport+required%29.'
   10     1        ASSIGN                                                   !1, '%28%3F%3A%0A%7C%0D%0A%7C%0D%29'
   11     2        INIT_FCALL                                               'preg_replace'
          3        CONCAT                                           ~4      '%2F%28%3F%3C%21', !1
          4        CONCAT                                           ~5      ~4, '%29'
          5        CONCAT                                           ~6      ~5, !1
          6        CONCAT                                           ~7      ~6, '%28%3F%21'
          7        CONCAT                                           ~8      ~7, !1
          8        CONCAT                                           ~9      ~8, '%29%2F'
          9        SEND_VAL                                                 ~9
         10        SEND_VAL                                                 ''
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $10     
         13        ECHO                                                     $10
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.96 ms | 1386 KiB | 15 Q