• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

In PHP, which is faster: preg_split or explode?

phpexplodepreg-split


PHP Snippet 1:

$keyword = explode(' ', $_GET['search']); //or preg_split
print_r($keyword);

$keyword = array_filter($arr, 'empty');
print_r($keyword);

Related Snippets

Can't call javascript alert alertify library from PHP

Getting output of MS stored procedure on php call

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

RuntimeException: Unable to create the cache directory (/var/www/sonata/app/cache/dev)

What is my SQL missing?

Populate Dynamic Dropdowns List in Codeigniter

Cache clear probem in Larave

I need to link Google Sheet with my Laravel

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

Session timeout in Yii2

Get number of working days between two dates in PHP [duplicate]

Maatwebsite Excel 3.1 : how do I skip duplicate data when imported?

Reload parent page after submit in iframe

How to change HTML structure inside WP <head>

About Contact Privacy policy Terms and conditions