Tốc Độ Việt - Dịch vụ Hosting, Tên miền, Máy chủ, Thiết kế WebsiteWeb Hosting, Dịch vụ máy chủ, cho thuê máy chủ, thuê chỗ đặt máy chủ, cho thuê VPS, máy chủ ảo, Cloud hosting, Email hosting, Tên miền, Đại lý hosting
Khắc phục lỗi The function split() is deprecated in PHP 5.3
Tốc Độ Việt - Dịch vụ Hosting, Tên miền, Máy chủ, Thiết kế Websitehttps://tocdoviet.com/assets/images/logo.png
Thứ tư - 24/07/2013 03:48
Để khắc phục cảnh báo The function split() is deprecated, bạn thay splie thành explode. Cấu trúc của explode cũng giống như spilt. Tuy nhiên, tốc độ thực thi của explode thì nhanh hơn rất nhiều.
The biggest difference is explode() takes a delimiter to split by, while split() takes a regular expression. This means that explode() is going to execute faster. Also, the PHP documentation says that preg_split() is faster than split(), so really there isn’t much of a reason to use split() at all.