p 1000 - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of p 1000.php

  1. <?php
  2.  
  3. $xml = '
  4. <html>
  5.     <title>xxx</title>
  6.     <p>
  7.         <ht:news_item_title>Title 1</ht:news_item_title>
  8.         <ht:news_item_snippet>Did you like this tool? You can donate to us. This will help us improve our free web tools.</ht:news_item_snippet>
  9.         <ht:news_item_url>https://google.com</ht:news_item_url>
  10.         <ht:news_item_source>google.com</ht:news_item_source>
  11.     </p>
  12.     <p>
  13.         <ht:news_item_title>Title 2</ht:news_item_title>
  14.         <ht:news_item_snippet>Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML</ht:news_item_snippet>
  15.         <ht:news_item_url>https://youtube.com</ht:news_item_url>
  16.         <ht:news_item_source>youtube.com</ht:news_item_source>
  17.     </p>
  18. </html>
  19. ';
  20.  
  21. preg_match_all('/\<p\>((?!\<\/p\>).){100,}\<\/p\>/ims', $xml, $items);
  22.  
  23. print_r($items);
  24.  
  25.  
File Description
  • p 1000
  • PHP Code
  • 09 May-2023
  • 871 Bytes
You can Share it: