• 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

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

Can't exclude directories from .htaccess mobile redirect?

Laravel: HTML in notification

Php - Sum up the numbers in an array one by one

Error converting docx to pdf using Unoconv

SilverStripe unable to populate multiple member Childs

Match csv filenames to table names and import

How to add a heading in between checkout fields of WooCommerce

WAMP Virtual Host not working

Yii2 redirecting to previous page after login

PHP date() with timezone?

How to validate Envato Purchase Code in PHP

What is the difference between client-side and server-side programming?

PHP array_filter with arguments

PHP: remove filename from path

About Contact Privacy policy Terms and conditions